SRCDS Steam group


Keeping Server Started
#1
I'm starting to start a CS:S server, but as soon as I close SSH, the server closes.

Here's my startup command:

./srcds_run -console -game cstrike +map de_dust +maxplayers 20 -autoupdate &

I've never had a problem like this with anything else.
Reply
#2
The problem here is that you are running the srcds as your user on your terminal, once you disconnect your terminal (by closing your ssh session) your srcds server closes along with all your other processes. The method to resolve this, as suggested in this sites tutorial for linux, is to run the server using the gnu screen program to run it on a separate detached terminal that will be persistant when you logoff. For full details on how to achieve this click the tutorials button right at the top then head to the linux install tutorial, details on running with screen are towards the end.

AfterGlow
Reply
#3
Hmm, thats weird, adding & should keep it alive. i've always added and and closed my SSH sessions and the server stays up.
[Image: userbar_wow.jpg]
starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
Reply
#4
AfterGlow Wrote:The problem here is that you are running the srcds as your user on your terminal, once you disconnect your terminal (by closing your ssh session) your srcds server closes along with all your other processes. The method to resolve this, as suggested in this sites tutorial for linux, is to run the server using the gnu screen program to run it on a separate detached terminal that will be persistant when you logoff. For full details on how to achieve this click the tutorials button right at the top then head to the linux install tutorial, details on running with screen are towards the end.

AfterGlow
That shouldn't matter since & makes the process run in the background, meaning closing SSH shouldn't make a difference.

Anyone else having this problem or know a solution? Installing/running screen is the last thing I want to do.
Reply
#5
I coulnd't get the & to work so I just installed GNU Screen. It's not that hard... Wink

Tracer
CS:Source 66.194.153.223:27015
Natural Selection 66.194.153.223:27016
Reply
#6
Not being a linux guru my assumption would be that & moves it into the background but keeps it running under your current login, but thats only an assumption.

AfterGlow
Reply
#7
While it does send it to the background, it should keep it running, unless a kill -9 <pid> is issued. are you logging out the moment you run the command?
[Image: userbar_wow.jpg]
starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
Reply
#8
You are quite right, running a process with & should indeed leave it running as a background process. What kernel version/distro are you using?

PolishPanda Wrote:Anyone else having this problem or know a solution? Installing/running screen is the last thing I want to do.

I would advise you to seriously consider installing and trying out screen. It really does simplify the process of managing servers that are currently running.

I have a single shell script that creates appropriately named screens for all of the srcds processes I have running on a server. If I need to administer one from the command line (which I do frequently at the momment thanks to the rcon disconnect bug) I can simply ssh to the offending server and view the screen it is attached to.

One thing I to beware of when running screen is to always create the screen process as the currently logged in user (i.e. owner of the terminal).

For example: If you login as userX and then su to userY and attempt to attach a srcds to a screen process you will be unable to as the terminal permissions belong to userX (the user who spawned the tty in the first instance).

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)