SRCDS Steam group


SRCDS changes port after auto-restart BUG!!!
#1
Ok so I am running srcds server on UNIX/FreeBSD system. When i try to restart the server or when it restarts on it's own after crash it always starts on different port that is +1 bigger then the first. For example if I start the server on 27015 and the server crashes and restarts, it will bind to 27016, the next crash it binds to 27017 and so on. What is going on here? Why it doesn't want to bind to original port after crash/restart?

Thank you.
Reply
#2
my initial guess is the initial process isn't completely dieing and is still bound to the port. Try a netstat -lpnute | grep ":27015" to see whats bound to that port. I'm not too familiar with freebsd and I know some of their commands are a bit different than other linux systems so there may be a little variation in that command.
Reply
#3
OK so that is the problem. After crash the port is stil binded and the server tries on +1 port. WHY?
How can I force the server to close the port after crash? I've tried 5 crashes and all ports stayed binded :S untill I kill the process manually. How can I fix this? Thank you very much.
Reply
#4
That means the srcds process isn't really crashing. Its still getting hung. You could try to write a script to automate killing that process. Just something like:

kill -9 `netstat -lpnute | grep ":27015" | awk '{print $8}' | cut -d/ -f1`


should do the trick. At least if your netstat is formatted the same as is it is on the centos machine I just tested that on. You may need to change the number on the awk command to represent the column for the pid/program.
Reply
#5
(02-12-2010, 12:19 PM)skeletor Wrote:  That means the srcds process isn't really crashing. Its still getting hung. You could try to write a script to automate killing that process. Just something like:

kill -9 `netstat -lpnute | grep ":27015" | awk '{print $8}' | cut -d/ -f1`


should do the trick. At least if your netstat is formatted the same as is it is on the centos machine I just tested that on. You may need to change the number on the awk command to represent the column for the pid/program.

Yes the process is not completly crashing and IT CAN'T because srcds automaticly restarts the server if there is crash. But when that occures the process is not killed but it is somehow only the server restarted.
Reply
#6
what do you have restarting the server when it crashes? You may need to modify that.
Reply
#7
(02-12-2010, 09:44 PM)skeletor Wrote:  what do you have restarting the server when it crashes? You may need to modify that.

Don't understand you quiet well sorry Big Grin
Reply
#8
How does your server restart automatically after it crashes? Typically you have something that's monitoring the server so when it crashes the process is automatically restarted.
Reply
#9
(02-13-2010, 12:11 PM)skeletor Wrote:  How does your server restart automatically after it crashes? Typically you have something that's monitoring the server so when it crashes the process is automatically restarted.

NO SRCDS is ment to restart itself on crash. There is message "Server will restart in 10 seconds" and it restars itself BUT IT IS NOT SELF KILLING THE OWN PROCESS Big Grin
Reply
#10
SRCDS doesn't restart on its own. Is it trying to autoupdate? Please post your startup line so we can better help you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)