I used to get this quite regularly so I do this before attempting to restart the server:

  # ensure port is free
SERVER_PORT=$(grep hostport tf/cfg/autoexec_${SERVER}.cfg | cut -d' ' -f 2)
  netstat -n -a -u | grep -q $SERVER_PORT
  while [ $? -eq 0 ]; do
    echo "Port $SERVER_PORT is bound, waiting ..."
    sleep 3
    netstat -n -a -u | grep -q $SERVER_PORT
  done


On 17/02/2013 6:29 PM, Weasel wrote:
I've seen this twice now.
The TF2 server crashes.
It auto-restarts.
When it comes back-up again, it doesn't use the port number that has been 
specified (and before the crash it had been using).
My guess, is that when the binary crashes, the old port/socket doesn't get 
released immediately.
So, when the binary get's started back up, it's not immediately available - so 
it picks another port.
Needless to say, this is a big deal for servers where many players use their 
"favorites" list to find.
This didn't start with the latest round of TF2 updates.
The first time I saw it was back on January 25t - never before.
Since then, It's only happened maybe twice - including just now.

Platform: Linux
Operating System: CentOS 5.9
Architecture: 32-bit (x86).

Recent debug.log file (cleared after last TF2 update):

----------------------------------------------
CRASH: Sat Feb 16 01:05:06 PST 2013
Start Line: ./srcds_linux -secure -game tf +port 29016 -steamport 29116 -debug
End of Source crash report
----------------------------------------------
----------------------------------------------
CRASH: Sat Feb 16 10:15:59 PST 2013
Start Line: ./srcds_linux -secure -game tf +port 29016 -steamport 29116 -debug
End of Source crash report
----------------------------------------------
----------------------------------------------
CRASH: Sat Feb 16 13:10:10 PST 2013
Start Line: ./srcds_linux -secure -game tf +port 29016 -steamport 29116 -debug
End of Source crash report
----------------------------------------------
----------------------------------------------
CRASH: Sat Feb 16 23:00:52 PST 2013
Start Line: ./srcds_linux -secure -game tf +port 29016 -steamport 29116 -debug
End of Source crash report
----------------------------------------------

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux

Reply via email to