I can't keep the server online on a VPS/Dedicated Server
#1
Hello people,

I'm running MCServer/Cuberite on my VPS and everything seems to be working great, except one thing. I'm connected to it via SSH (Linux), if I run the server and disconnect myself from the VPS, Cuberite goes off (as expected with any process).

I have tried running the following commands to keep MCServer/Cuberite online, and it looks like it keeps running, but apparently it doesn't answer to ping requests nor allow players to join:

Code:
./MCServer &
nohup ./MCServer &

I'm running CentOS 7 64-Bits with Cuberite binaries compiled from source.

Is anyone else having this problem or just me? Is there any solution to this?

Thanks in advance! Smile
Reply
Thanks given by:
#2
I used to run it using the screen command, and that worked out for me.
Reply
Thanks given by: Nixtren
#3
Although this is not an exact solution or answer to why the problem is occurring, I suggest using screen or tmux.
https://www.gnu.org/software/screen/
http://tmux.github.io/
Reply
Thanks given by: Nixtren
#4
Thank you both, I have tried screen and it works Smile

For those who have the same problem as me:
Run "screen" (you might need to install it), run the server and then detach the screen (CTRL+a and then d).
Reply
Thanks given by:
#5
You can also use the built in -d option, which daemonizes the server.
Reply
Thanks given by:
#6
Use Tmux or screen. I made a guide for Tmux here.
TL;DR:
1. Install Tmux in the server.
2. SSH into the server.
3. type "tmux".
4. Type anything you please in the virtual terminal that opens up, (in this case, ./MCServer).
5. Hit Ctrl-B, then D to detach from the virtual terminal and send it to the background.
6. You can log out now and the server will still live on in the virtual terminal.
7. To check the server console or shut it down, attach to the terminal by ssh'ing into the server again and then typing "tmux attach".
Reply
Thanks given by:
#7
Always used screen and a simple start/stop script. Works like a charm. Combine that with a dyndns auto update script and a backup script and you can leave for a year and come back and see that NOTHING works as planned! ;D

Well you can leave this unattended ... for a while Wink.
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)