RocketMod / Rocket.Unturned

Unturned 3 implementation of the RocketMod — .NET Game Server Plugin Framework
MIT License
85 stars 111 forks source link

Random crashing #39

Closed errorcode404wtf closed 7 years ago

errorcode404wtf commented 7 years ago

OS: Ubuntu 15.04 Unturned: 3.17.0.1 Rocket: Linux 710

Description: Lately my server has been just shutting down out of the blue. Every once and a while it will give a report in the screen message board but I can't seem to find that in the logs or a crash report. This is getting very annoying because my server is down for hours at a time, losing many players. I'm not sure where to look for a crash report, but if I do find one I will be sure to report here.

jserodio commented 7 years ago

You might want to check this for automatic rebooting of your server (in case of a crash). Check the answer: http://stackoverflow.com/questions/38465751/reboot-is-not-working-in-cron

errorcode404wtf commented 7 years ago

Umm, my Unturned server is crashing, I don't need to restart my dedicated everytime it crashes. This isn't even close to what I was talking about.

jserodio commented 7 years ago

Hackers can take down our servers easily. I've seen it doing in my own server. All you can do is ban hackers and try to keep it online. Some plugins could make it crash too, but in that case you could see it in the logs.

errorcode404wtf commented 7 years ago

What exactly am I supposed to use in this auto reboot considering you sent me someone's broken script?

jserodio commented 7 years ago

It's not a broken script. I made this question to Stack Overflow, and they answered me a very NICE way to restart any scripts like (start.sh) at Linux boot, and even if your unturned server crashes it will auto boot again. This way I've 99.99% of uptime. Remember that I tried to help you and there is no need to be mean in any way. I rarely get a crash, and even if I have one, I don't even notice because of this little trick described in the answer I just provided you. I was willing to share, as you were having issues with 'down for hours, losing players'. You are in Github, this is not a random forum in the random internet, learn to contribute.

errorcode404wtf commented 7 years ago

Sorry, I have a tendency for being a dick. I am quite new to this whole thing and I really don't understand the post. I have tried using the check.sh but that only started the server, didn't reboot it when it crashed. I honestly have no idea what to do, again I'm sorry for being a dick.

jserodio commented 7 years ago

Apologies accepted, for being honest if you are kinda new to this it can be hard to understand. About the crash you really need to search the logs in '(..)/unturned/Servers/serverInstanceName/unturned.log' or '(..)/unturned/Servers/1/Rocket/Logs'. As I said, the information there would help you determine if your server crashed because of any loaded plugin. You can always try to launch the server without the plugin and wait for some hours if you get any crash (maybe while you sleep). To launch your server WITHOUT rocket (which means it wont load any plugin) you can run this command BEWARE of your SERVER INTANCE NAME: '/home/steam/unturned/Unturned_Headless.x86 -nographics -batchmode -logfile Servers/serverInstanceName/unturned.log +secureserver/serverInstanceName'

errorcode404wtf commented 7 years ago

I'm slowly putting the pieces together. The whole systemctl thing and how it works. Thanks for this. :)

errorcode404wtf commented 7 years ago

I have a couple questions,

  1. How would I make the auto restart make a screen to view the console of the server?
  2. How would I make the server auto restart to make sure it's working?