Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just switched from a virtual Windows to a dedicated linux Server to get more perfomance ( 64GB RAM , i7 6700, 1Gb Up/Download ). Im hosting a Teamspeak3 and a GarrysMod ( Gaming ) Server on that server. I already used Linux and thought that it would be great because of the saved CPU Power and the securtiy. Acctually the Teamspeak and the Gaming Server are working perfectly, but if im closing PuTTY, the Gaming-Server automaticly shut down but the Teamspeak-Server keeps online. So I have to lauch PeTTY all day long on my PC to keep the Gamingserver alife. Do you guys eventually know how to fix that problem?
A little more information would help us help you:
What version/distro of Linux are you running?
How are you starting the Teamspeak3 server?
How are you starting the Gaming server?
The server runs on Ubuntu 16.04. Im starting teamspeak via the files and then "./ts3server_startscript.sh start". If I want to start the GMod-Server im going into the files and then start the server with "./srcds_run".
The server runs on Ubuntu 16.04. Im starting teamspeak via the files and then "./ts3server_startscript.sh start". If I want to start the GMod-Server im going into the files and then start the server with "./srcds_run".
If you do that in a putty session, most processes started during the session will end with the session. That is what you are observing, Options are to start it outside of any session (ie: as a service}, or in a way that will ignore the session hangup (nohup and background). Changing the astart from "command" to "nohup command &" starts it in the background ignoring hangup.
If you don't want to start automatically you can use tmux or screen to disconnect the server from putty.
Teamspeak is configured as a service so it does not need to be disconnected from putty and how to automatically start it is provided by the links above.
Distribution: Ubuntu based stuff for the most part
Posts: 1,177
Rep:
Another option to fix this would be once you login with putty, then start a screen session and then start the applictions in that. Disconnect from the screen session and you can close putty.
Latter you can connect with putty and reattach to the screen session with "screen -r"
Last edited by uteck; 03-15-2020 at 07:46 AM.
Reason: typo
If you do that in a putty session, most processes started during the session will end with the session. That is what you are observing, Options are to start it outside of any session (ie: as a service}, or in a way that will ignore the session hangup (nohup and background). Changing the astart from "command" to "nohup command &" starts it in the background ignoring hangup.
Its seems like it works! But how can I stop the server?
Last edited by LordHomeboy; 03-15-2020 at 09:09 AM.
Reason: Wrong Question
Another option to fix this would be once you login with putty, then start a screen session and then start the applictions in that. Disconnect from the screen session and you can close putty.
Latter you can connect with putty and reattach to the screen session with "screen -r"
I also recommend this, I used screen extensively when I hosted different game-servers since I wanted easy access to the console live feed etc.
I also use screen (and screenie, one of many screen front ends that make it "friendlier") and recommend it highly. I do not generally recommend it for starting services. While it would work, one of the other options would be lighter and more efficient. Your call, of course.
To be clear, even if you do not use screen for this specific purpose, it is something you will value once you learn to use it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.