Cuberite Forum
[Solved] Can't start Webadmin - Address already in use - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: [Solved] Can't start Webadmin - Address already in use (/thread-1565.html)



[Solved] Can't start Webadmin - Address already in use - VaiN - 09-05-2014

When launching MCServer it's failing to start webadmin due to the port already being in use (it is).

Quote:[09:16:34] WebServer: The server is running in secure HTTPS mode.
[09:16:34] WebServer IPv4: Cannot bind port 8080: "98: Address already in use".

How do I tell it to use a different port? I can't really modify the service using 8080 without more effort than It's worth.

Is there any documentation on this?

I'm already running nginx with two sites, so it seems kind of silly to run another web server, especially when I've already created a web interface attached to my forum to administrate other game servers. Any plan to move the website logic out of C++ for use on existing web servers? If not I don't really mind, as it's a dedicated server with more than enough resources, but I'd at least like to be able to configure it. I tried looking through the HTTPServer source but I'm not too familiar with C++.

I wouldn't run it at all, but there's not really any convenient way to configure groups/permissions otherwise with them being in a sqlite file. Out of curiosity, would it be possible to disable the default permissions/groups and roll my own Lua plugin to handle it?

OS: Ubuntu Server 14.04 x86_64


RE: Can't start Webadmin - Address already in use - Seadragon91 - 09-06-2014

There should be a file named webadmin.ini where you can change the port.


RE: Can't start Webadmin - Address already in use - VaiN - 09-06-2014

There's no port mentioned in that file.

I searched the source a bit more and did find it:
Code:
m_PortsIPv4 = m_IniFile.GetValueSet("WebAdmin", "Port", "8080");
m_PortsIPv6 = m_IniFile.GetValueSet("WebAdmin", "PortsIPv6", "");

So I added that to the webadmin.ini:
Code:
[WebAdmin]
Port=8181
PortsIPv6=

It does start the webadmin now. The connection to the site seems to be timing out after a long while, but at least it's running. Thanks for the help, I'll keep messing with it later.


RE: Can't start Webadmin - Address already in use - NiLSPACE - 09-06-2014

If the webadmin file was empty then you probably don't know how to create a user either. You do it by adding this to the file:
Code:
[User:<Name>]
Password=<Password>

For example for a user named "admin" where the password is "Example" you do:
Code:
[User:admin]
Password=Example



RE: Can't start Webadmin - Address already in use - tigerw - 09-06-2014

The webadmin configuration should have been automatically generated :/


RE: Can't start Webadmin - Address already in use - VaiN - 09-06-2014

I renamed the file and allowed it to generate, it's the same as it was:
Quote:; This file controls the webadmin feature of MCServer
; Username format: [User:*username*]
; Password format: Password=*password*; for example:
; [User:admin]
; Password=admin
I had already set up the login. It just didn't mention any port option by default.


RE: Can't start Webadmin - Address already in use - tigerw - 09-06-2014

Bugs++;


RE: Can't start Webadmin - Address already in use - xoft - 09-06-2014

Reported on github as issue #1382:
https://github.com/mc-server/MCServer/issues/1382