Hey, sorry if you've seen this before and theres been a solution to it but I've tried to find a script which can detect if you're server has gone offline. (Common Problem, 4GB ain't enough ) So is there a script that can detect if you're server has crashed/gone off/ died/ java killed or killed and restart the server via another script (I've got the script that starts the server, don't worry) I'm using ubuntu 10.04.3 LTS (Long Time Service) and controlling it via SSH, pretty much all I can tell you.. So if anyone wants to take the time to helping me it'd be reallllllly appreciated. Thanks in advance ~ Danny ~
hmm the problem with a plugin is that your java crashed... I normally just reboot the server from time to time.. there is SimpleRestart or TheMonkeyPack for this.. There are also some wrappers I guess who can do that.. I forgot the name though.. what you could also probably do is write a cron job and check if the log changed in the last let's say 5 minutes... if not you could try to sighup the java task..
Yeah, java is irrelevant is this case as you state, it crashes, well I'm standardly using screens with ubuntu and usually the problem is the screen kills itself also crashing the screen which is very annoying. Wrappers? Never heard of them, care to explain more? I like the idea of cron jobs and would like to implement one except... I have no idea.. how to... which kinda sucks because if I could it would be so easy to do it. Is it possible if you or anyone could make one for me? It'd be very grateful towards you..
I don't like using GUI's to be honest.... thanks for the input but I'd prefer a script that read the server.log as Don Redhorse says and if it hasn't updated itself in 5 minutes it restarts the server. So the code in words is.. Script get's executed at the start of the server, script to run server is called "server.sh" and script checks server.log every 5 minutes and creates a variable with that number, it checks again in 5 minutes and if the script reads the size of server.log equals the variable it executes a delete screen "mcs" and recreates it and then runs ./server.sh that's the script in words.. one problem is... I don't know how the syntax for scripts.
Use RemoteToolkit. It's a wrapper that can detect if the server has crashed (Even if not fully, it also reads stack traces) and restart it, or automatically restart it at given times. And much more, just search for it.
i use remote tool kit with no issues....server restarts every six hours on the hour. plus the telnet option rocks for me.
Thank you very much searching for it now It looks pretty good, I've got it working now so it should be fun to play with, thanks for telling me about it, most appreciated EDIT by Moderator: merged posts, please use the edit button instead of double posting.