SRCDS Steam group


Having rcon related server problems? Can't find host? Check this for possible fix
#1
I decided I would try to figure out why I couldn't send any rcon commands to a server Im running here on my lan to test with, and here is what I found out. This is a Linux server btw, so I don't know if its the same for the windows people.

By default the linux dedicated server starts up setting its network ip to localhost (127.0.0.1) and opens 4 ports, 1 TCP (used for rcon) the rest UDP, at least thats with sv_lan set to 1. Now, the TCP port bounded to the address 127.0.0.1, meaning only clients connected to the host from the host itself could actually connect to that port at all. the ONLY way I have been able to fix this is by adding +ip 0.0.0.0 to the command line, as adding it to the config did NOT work.

The reason why is because the server (at least in the case of the linux DS) binds to its ports BEFORE reading the server config, and hence before it can read the ip from it. By passing it at the command, it knows before it actually binds itself, and can connect to the ip specified for each port (it affects all of them).

The other (UDP) ports are set to 0.0.0.0 by default if you were wondering.

In the case of multihoming, you would need to change 0.0.0.0 to whatever IP your supposed to use for the specific server.

I haven't tested turnning off sv_lan yet, but Im guessing its the same way.

BTW 0.0.0.0 = any host, basicly its equivilant to * (match any), which when making a listening socket, means make the socket on all address assigned to your machine. For any one who didn't know.
Reply
#2
so im assuming your behind a router, which is why you had the ip problem in the first place, and with windows if you try and add the external ip address to the cmd line, you will more then likely get a pretty little can not allocate server UDP port error that pops up causing you not to be able to start the server. adding "ip *.*.*.*.*" to the config mainly just makes it so i think in game you can go to console type ip and it will give you that ip. so yea really in the config its useless to put it there, cuz everyone in the world just types status.
anyways though, this is not the case with windows, just to let people know, or we will have everyone in there mother saying there server can't allocate udp port and blah blah blah. linux.. i don't know.
Reply
#3
No, that wasn't the issue at all, as Im on the same lan as the sever I was testng with. I guess this was a Linux only issue then. I mentioned this because I had searched, and found people with the same problem (on this board) and no fix posted.
The problem Im talking about is the same one I think is going on with
http://forums.srcds.com/showthread.php?tid=1160
and I know this thread is the same problem I was experiencing
http://forums.srcds.com/showthread.php?tid=1112

Im guessing Valves implentation was to simply bind to localhost at first, and forget about it, as it doesn't rebind the socket if you change the ip durring the game, so for linux, the only fix is to add ip on the command.

I think I know what you mean by external IP though, as you can't use sockets on an address the host doesn't own, so make sure the ip specified is one that the host does have control of, or you will probably get the same error in linux.

Just tested, error was
WARNING: NNET_OpenSocket: bind: Cannot assign requested address
Couldn't allocate dedicated server UDP port

Well, thats all for now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)