Chaos Cluster

Game & Guild Forums => Minecraft => Topic started by: Trerro on September 30, 2011, 12:57:03 am

Title: Restarting the server
Post by: Trerro on September 30, 2011, 12:57:03 am
Step 1: Connect
You'll need an SSH client, PuTTY is the one I personally use. (Grab it at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)(Fox edit: putty.exe for those confused, just fielded that question). Your choice of client doesn't really matter, but that's a good free Windows one if you don't have one.

The server IP is the same as you log in to the game with of course, and the user, password, and port are the same as the FTP login. I recommend saving the IP and port in PuTTY, so you don't have to keep looking up the IP.

Step 2: See if it's running
Once in, type screen -ls, it should say there's a screen session named Minecraft running. Step 3 depends on whether or not there is one.

Step 3: Connecting to the screen session or making a new one
If the session exists, type screen -r Minecraft. You should see the last few messages from the server, hopefully including an explanation of why it choked, but don't count on it.

If the session does not exist, then something went horribly wrong and the whole server crashed and rebooted. :P
You'll need to make a new screen sessions, with screen -S Minecraft.

Step 4: Stop the server if necessary
If the server is still running, but screwy, warn people you're about to shut it down with:

say "Your message here"

, then type stop after giving them enough time to get somewhere safe-ish.

Note: It always shows you the last X log messages. If the server is dead, the last line should be "Killed". If there's a killed elsewhere, then it should be up.

Step 5: Restart the server
java -Xms1536M -Xmx1536M -jar minecraft_server.jar nogui
Note: You can paste that long-ass command in with shift-insert to save a lot of typing.

Step 6: Detach from the session
Hold control, and press a, then d.

Step 7: Make sure the session is still up.
Type screen -ls again, you should see the Minecraft session.

That's it, you can now close PuTTy, and log into the game.