Running a master server
#1
I'm playing around with a master server, mostly to demonstrate whether a server can run on the same address as its master server, as someone claimed that it can't.

Here's what I have:

My IP address:

[asscube@cubic ~]$ ifconfig eth0 | grep inet
        inet 108.166.173.92  netmask 255.255.255.248  broadcast 108.166.173.95
        inet6 fe80::20c:29ff:fe29:a16b  prefixlen 64  scopeid 0x20<link>

Starting the master server:

[asscube@cubic assaultcube]$ authbind ./ac_master ./ 80 108.166.173.92

Verifying all is well on that end:

[asscube@cubic assaultcube]$ tail master.log
*** Starting master server on 108.166.173.92 80 at Sat Apr 14 19:01:19 2012 ***
reloading master.cfg

Verifying port 80 is OK:

jack@archeee ~ > nmap -p80 108.166.173.92

Starting Nmap 5.51 ( http://nmap.org ) at 2012-04-14 19:18 CDT
Nmap scan report for cust-108-166-173-92.corexchange.com (108.166.173.92)
Host is up (0.0086s latency).
PORT   STATE SERVICE
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 0.26 seconds

Testing using a local server:

[asscube@cubic assaultcube]$ ./3server.sh
reading commandline parameters from file 'config/3servercmdline.txt'
logging started: console(INFO), file(DEBUG, "serverlog_20120414_19.20.36_local#2121.txt"), syslog(DISABLED), timestamp(ENABLED)
Apr 14 19:20:36 logging local AssaultCube server (version 1104, protocol 1132/104) now..
Apr 14 19:20:36 read 28 map rotation entries from 'config/maprot.cfg'
Apr 14 19:20:36 read 11 admin passwords from 'config/serverpwd.cfg'
Apr 14 19:20:36 read 711 (778) blacklist entries from 'config/serverblacklist.cfg', 0 errors
Apr 14 19:20:36 read 138 + 262 entries from nickname blacklist file 'config/nicknameblacklist.cfg', 0 errors
Apr 14 19:20:36 dedicated server started, waiting for clients...
Apr 14 19:20:36 Ctrl-C to exit
Apr 14 19:20:36 looking up 108.166.173.92...
Apr 14 19:20:36 WARNING: could not connect

Testing from an external server:

jack@nobelium ~/assaultcube > ./2server.sh
reading commandline parameters from file 'config/2servercmdline.txt'
logging started: console(INFO), file(DEBUG, "serverlog_20120414_19.21.12_199.167.135.91#28763.txt"), syslog(DISABLED), timestamp(ENABLED)
Apr 14 19:21:12 logging local AssaultCube server (version 1104, protocol 1132/104) now..
Apr 14 19:21:12 read 9 map rotation entries from 'config/maprot.cfg'
Apr 14 19:21:12 read 11 admin passwords from 'config/serverpwd.cfg'
Apr 14 19:21:12 read 11 (11) blacklist entries from 'config/serverblacklist.cfg', 0 errors
Apr 14 19:21:12 read 0 + 1 entries from nickname blacklist file 'config/nicknameblacklist.cfg', 0 errors
Apr 14 19:21:12 dedicated server started, waiting for clients...
Apr 14 19:21:12 Ctrl-C to exit
Apr 14 19:21:12 looking up 108.166.173.92...
Apr 14 19:21:12 WARNING: could not connect

I noticed that I can't ping 108.166.173.92 from the external server:

jack@nobelium ~ > ping 108.166.173.92
ping: icmp open socket: Operation not permitted

So I tested from my own computer in case that was the point of failure for the external server:

jack@archeee ~ > ping 108.166.173.92
PING 108.166.173.92 (108.166.173.92) 56(84) bytes of data.
64 bytes from 108.166.173.92: icmp_req=1 ttl=47 time=11.2 ms
64 bytes from 108.166.173.92: icmp_req=2 ttl=47 time=11.3 ms
^C
--- 108.166.173.92 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 11.242/11.293/11.344/0.051 ms

jack@archeee ~/1.1.0.4 > ./server.sh
reading commandline parameters from file 'config/servercmdline.txt'
logging started: console(INFO), file(DISABLED), syslog(INFO, "AssaultCube[local#28763]", local6), timestamp(DISABLED)
logging local AssaultCube server (version 1104, protocol 1132/104) now..
read 58 map rotation entries from 'config/maprot.cfg'
read 0 admin passwords from 'config/serverpwd.cfg'
read 0 (0) blacklist entries from 'config/serverblacklist.cfg', 0 errors
read 0 + 0 entries from nickname blacklist file 'config/nicknameblacklist.cfg', 0 errors
dedicated server started, waiting for clients...
Ctrl-C to exit
looking up 108.166.173.92...
WARNING: could not connect

I can't forward the necessary ports where I am, but if failure to ping was causing the failure from Nobelium, I should have received a different error message from ArchEee.

Same issue when:

- Running "./ac_master ./ 80 108.166.173.92" as root
- Running "authbind ./ac_master ./ 80 127.0.0.1" and starting a local server with -m127.0.0.1
- Running "authbind ./ac_master ./ 80 localhost" and starting a local server with -mlocalhost
- Using -mexample.com where example.com has an A record to 108.166.173.92
- Using "authbind --deep ./ac_master ./ 80 108.166.173.92"

I don't know what's supposed to go in master.cfg, so my strongest suspicion is that I'm missing something vital there.

Touched master.cfg, same issue.

Added "clearbans" to master.cfg, same issue.

Any ideas?
Thanks given by:
#2
use this: \config\master 28760 localhost
Thanks given by:
#3
For AC, the master server is hardcoded (in everything except for the actual MS) as running on port 28760.
Thanks given by:
#4
Yeah, port 80 was your problem.
[Image: gameserver_on_masterserver.jpg]
Thanks given by:
#5
Oh, okay. I got some misinformation that the port was hardcoded to 80.

http://forum.cubers.net/thread-3675.html

Maybe I should have checked the source. :P

Thanks.

And it turns out that you can have a server reporting to an MS at the same address.
Thanks given by:
#6
That thread was (or turned into something) about the old (pre-1.1) master server, where it was indeed port 80.
Thanks given by:
#7
Cool, then. Was it changed because residential users generally can't use 80?
Thanks given by:
#8
No, it's because AC now uses a completely different master system. The old master was a ASP.NET application running on an IIS server (or something similarly horrible, you get the idea), which clients and servers communicated with via HTTP GET requests. 1.1 uses a new, much more streamlined and smaller master server which was backported from Sauerbraten. Now, it's just a barebones protocol based on one-line text commands.
Thanks given by:
#9
Oh, awesome. I bet the old one was a pain to deal with. Thanks.
Thanks given by: