English The server shuts down when I close PuTTY

15 replies
Goto Page
To the start Previous 1 Next To the start
Up
Kolia_rus
GAME BANNED
Offline Off
Hi. I decided to re-create my server. Now I chose the Debian 10 system, but encountered a problem. When I close the PuTTY terminal, the server stops working. I'm not running the server under root.

This is what do I do:
Code:
1
2
cd /usr/games
./cs2d_dedicated


Should I use special characters after ./cs2d_dedicated?
You received a game ban because you seem to be a cheater. You are not able to log-in in-game anymore.
29.05.20 04:35:10 pm
Up
Maksim_KoToB
User
Offline Off
use screen
29.05.20 04:38:10 pm
Up
Kolia_rus
GAME BANNED
Offline Off
You mean the GNOME interface through mstsc? Are there other methods to solve the problem? For me it is inconvenient to send commands through it. Lags, lags, lags...
You received a game ban because you seem to be a cheater. You are not able to log-in in-game anymore.
29.05.20 04:41:55 pm
Up
G3tWr3ck3d
User
Offline Off
no help for game banned
Mess with the best, die like the rest. ༼ つ ◕_◕ ༽つ
29.05.20 04:46:42 pm
Up
BcY
Reviewer
Offline Off
Start your server with nohup.

Code:
1
nohup ./cs2d_dedicated &
Kgb2d Community - Since 2012
29.05.20 04:46:57 pm
Up
Kolia_rus
GAME BANNED
Offline Off
@user G3tWr3ck3d: go type messages elsewhere or continue upping my topic.

@user BcY: thank you very much, but now I cannot see the server status through terminal: messages about current events (e.g. chat messages, U.S.G.N status updated) are not sent. Is there a way to fix this?
You received a game ban because you seem to be a cheater. You are not able to log-in in-game anymore.
29.05.20 04:53:20 pm
Up
Maksim_KoToB
User
Offline Off
user Kolia_rus has written:
You mean the GNOME interface through mstsc? Are there other methods to solve the problem? For me it is inconvenient to send commands through it. Lags, lags, lags...


Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals) inside that session. Processes running in Screen will continue to run when their window is not visible even if you get disconnected.
29.05.20 04:58:45 pm
Up
Kolia_rus
GAME BANNED
Offline Off
user BcY has written:
Start your server with nohup.

Code:
1
nohup ./cs2d_dedicated &


oh lol, now I dont understand how does it work: my server has been shutted down just now, and in U.S.G.N its status is marked as 'timeout'.

user Maksim_KoToB has written:
user Kolia_rus has written:
You mean the GNOME interface through mstsc? Are there other methods to solve the problem? For me it is inconvenient to send commands through it. Lags, lags, lags...


Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals) inside that session. Processes running in Screen will continue to run when their window is not visible even if you get disconnected.


That is, should I connect via mstsc and start the terminal through GNOME (just about)? Really no other solutions? My server is lagging while it is launched graphically.

---
EDIT

This is not an error, I guess?
Code:
1
2
3
cs2d@koliarus1:/usr/games$ nohup ./cs2d_dedicated &
[1] 24654
cs2d@koliarus1:/usr/games$ nohup: ignoring input and appending output to '/home/cs2d/nohup.out'
You received a game ban because you seem to be a cheater. You are not able to log-in in-game anymore.
29.05.20 05:10:49 pm
Up
Maksim_KoToB
User
Offline Off
user Kolia_rus has written:
user BcY has written:
Start your server with nohup.

Code:
1
nohup ./cs2d_dedicated &


oh lol, now I dont understand how does it work: my server has been shutted down just now, and in U.S.G.N its status is marked as 'timeout'.

user Maksim_KoToB has written:
user Kolia_rus has written:
You mean the GNOME interface through mstsc? Are there other methods to solve the problem? For me it is inconvenient to send commands through it. Lags, lags, lags...


Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals) inside that session. Processes running in Screen will continue to run when their window is not visible even if you get disconnected.


That is, should I connect via mstsc and start the terminal through GNOME (just about)? Really no other solutions? My server is lagging while it is launched graphically.
[/code]

Use PuTTY
and install the screen (if missing)
use the commands.
29.05.20 05:14:49 pm
Up
Kolia_rus
GAME BANNED
Offline Off
it doesn't work for me, if I correctly understand what do you mean by screen.
You received a game ban because you seem to be a cheater. You are not able to log-in in-game anymore.
29.05.20 05:34:56 pm
Up
Kolia_rus
GAME BANNED
Offline Off
Thank you so much, @user Maksim_KoToB and @user BcY.

For anyone who has the same problem: type screen first, and only then use command by @user BcY.

P.S.: @user DC: why not to add this to cs2d.com F.A.Q?
edited 1×, last 29.05.20 05:59:28 pm
You received a game ban because you seem to be a cheater. You are not able to log-in in-game anymore.
29.05.20 06:17:56 pm
Up
MikuAuahDark
User
Offline Off
An another alternative would be
tmux
. In Debian you can install it with
sudo apt-get install tmux
, and you can read the tutorial here and their comparison between
screen
here.
file cs2d LuaJIT for Dedicated Server (13) JIT POWER! | Know your Lua errors! | Part of LÖVE development team since 11.3
29.05.20 07:00:38 pm
Up
VADemon
User
Offline Off
I suggest you to use and learn tmux, but screen is very simple if that's all you need:
•
screen -S cs2d
- start a new console session named "cs2d"
•
screen -r <pid/name>
or
screen -r cs2d
- reconnect to console
• CTRL+A then CTRL+D - "detach" from currently open console. It will continue to run on the server in background
•
screen -list
- lists all screens by your user.

Now if you detach from screen and close Putty (ssh client) your server will not shutdown. √
29.05.20 07:11:44 pm
Up
ohaz
User
Offline Off
If you have to learn a new tool anyway, learn tmux instead of screen. It's a basically a better version of screen
https://ohaz.engineer - Software Engineering
29.05.20 08:01:20 pm
Up
Kolia_rus
GAME BANNED
Offline Off
Ok, thanks to everyone here!

P.S.: you should use
screen -d <pid>
before
screen -r <pid>
.
edited 1×, last 30.05.20 09:52:51 pm
You received a game ban because you seem to be a cheater. You are not able to log-in in-game anymore.
To the start Previous 1 Next To the start