I hope this translates well.
As my colleagues here have said, you should use -strictportbind to make
sure that when a server starts, it will not try to use network ports
other than those it was specifically/explicitly assigned.
If you are running more than one srcds on a single host, you need to
protect yourself from this bad behavior.
You should assign specific ports to each of your servers and keep track
of your assignments in a file, like a "server-ports.txt" file. Use a
range of ports which isn't being used by anything else on your system.
You should only assign odd or even ports, as one of the srcds ports is
badly behaved and will always use the next port up (+1) instead of
whatever you told it to use. By leaving a single space between each port
assignment, you leave yourself room to prevent a trainwreck/clusterfuck.
Here is an actual example from a startup script system that I use:
$BINDIR/srcds_run -game csgo -ip $DBINST_CFG_IPADDR -strictportbind
+clientport $DBINST_CFG_CLIENTPORT +hostport $DBINST_CFG_HOSTPORT
+tv_port $DBINST_CFG_TVPORT -steamport $DBINST_CFG_STEAMPORT -pidfile
$PIDFILE -console -usercon $EXTRAARGS +map $STARTMAP"
WARNING: The srcds command has a mind-numbingly stupid character
limitation of something like 127, so be careful. ...And they say Valve
only hires the best and the brightest. pfttttt.
This translates into:
./srcds_linux -game csgo -ip 1.2.3.4 -strictportbind +clientport 27031
+hostport 27131 +tv_port 27231 -steamport 26031 -pidfile
/srv/srcds/srcds-csgo-server1/server.pid -console -usercon +game_type 0
+game_mode 0 +mapgroup mg_bomb +map de_dust
And lsof tells me:
lsof says the following network sockets are in use by PID 10599:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
srcds_lin 10599 hlds 5u IPv4 591193779 0t0 UDP 1.2.3.4:27131
srcds_lin 10599 hlds 6u IPv4 591193780 0t0 UDP 1.2.3.4:27031
srcds_lin 10599 hlds 7u IPv4 591193781 0t0 UDP 1.2.3.4:27231
srcds_lin 10599 hlds 8u IPv4 591193782 0t0 TCP 1.2.3.4:27131
(LISTEN)
srcds_lin 10599 hlds 10u IPv4 591198219 0t0 TCP
127.0.0.1:35860->127.0.1.1:mysql (ESTABLISHED)
srcds_lin 10599 hlds 27u IPv4 591193943 0t0 TCP *:55905 (LISTEN)
srcds_lin 10599 hlds 28u IPv4 591193944 0t0 UDP *:27036
srcds_lin 10599 hlds 30u IPv4 591193964 0t0 UDP 1.2.3.4:26032
Which is interesting, because this server is disrespecting my request to
bind to a specific IP, and it's globbing all the IPs for that 27036
port... which hasn't been assigned to it anyway. I'm not sure WTF that
is, but it's a problem.
Looking at "sudo netstat -anp | egrep srcds" shows only my CSGO server
is doing this out of several other srcds servers.
On 11/17/13, 2:15, Кирилл Крылов wrote:
>
> Hello Colleagues!
> Your updates are very pleasent for us, because
> they do our life more saturated, namely:
> after the last update from November 15 2013
> we've got the problem - ANY FIRST running
> server CS:GO, (ecxept normal ports - 338xx,
> 269xx, 270xx, 270xx. 270xx), is using the port
> upd 27036. All the next running servers are using
> only standart five ports, but if you turn off the
> first server, then the next started server will
> take the freed port upd 27036.
> Why does that happen? We use this port for a different
> server, which can't start normaly if this port (27036)
> is already in use (busy).
>
> The Operation system - CentOS-6.4-x86_64
> Core - 2.6.32-358.23.2.el6.x86_64
> Library glibc - 2.12
>
> We will be very grateful for any answer.
> _______________________________________________
> Csgo_servers mailing list
> [email protected]
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/csgo_servers
_______________________________________________
Csgo_servers mailing list
[email protected]
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/csgo_servers