raptorjr 9 Posted June 10, 2015 Share Posted June 10, 2015 If I'm lucky, Emby server only crasch once a day, and I have only one time seen it running for 5-6 days. But it is annoying when I want to sit down and watch something just to realize that the server have crasched again. I'm not that good on Linux/Ubuntu, but I wonder if there is some way to automatically restart a crasched Emby server process? I've heard of something called monit, but don't know how to use it. But maybe there is other things I could use to accomplish the same thing? Link to comment Share on other sites More sharing options...
freebs 2 Posted June 11, 2015 Share Posted June 11, 2015 (edited) Open a terminal type as follows: sudo service emby-server restart it will ask for root password emby will restart - mine crashes as well, not sure why yet. Edited June 11, 2015 by freebs 1 Link to comment Share on other sites More sharing options...
Deihmos 147 Posted June 11, 2015 Share Posted June 11, 2015 I am just curious why you would use it if not good with it? I installed ubuntu to try it out yesterday and installed emby but couldn't imagine switching. I have had emby running over 30 days and I have never seen it crash. That's on Windows though. Link to comment Share on other sites More sharing options...
Lessaj 40 Posted June 11, 2015 Share Posted June 11, 2015 My server (linux mint 17.1) has been up for 125 days, I haven't rebooted it since I built it. Not a single emby crash. Link to comment Share on other sites More sharing options...
Lessaj 40 Posted June 11, 2015 Share Posted June 11, 2015 (edited) I'm freehanding this but you can try something like this: (as root, or do some work with expect to type in your password for you, you'll have to add sudo infront of the server start if you do that) nohup ~/mbhealthcheck.sh & #!/bin/bash while [ 1 ] do CHECK=`ps -ef | grep -i mediabrowser.server | grep -v grep | wc -l` if [ $CHECK -eq 0 ] then service emby-server start fi sleep 300 done Edited June 11, 2015 by Lessaj Link to comment Share on other sites More sharing options...
Saner2oo2 4 Posted June 11, 2015 Share Posted June 11, 2015 from memory. sudo apt-get install monit sudo nano /etc/monit/monitrc change (if you want its httpd) set httpd port 2812 to remove the hash (#) set httpd port 2812 and allow user:password. add to the end, before the includes. ############## check process emby-server with pidfile /var/run/emby-server.pid start program = "/etc/init.d/emby-server start" stop program = "/etc/init.d/emby-server stop" if failed host localhost port 8096 then restart ############### sudo service monit restart http://localhost:2812 1 Link to comment Share on other sites More sharing options...
ressu 13 Posted June 11, 2015 Share Posted June 11, 2015 You might also check out this post: http://emby.media/community/index.php?/topic/21954-emby-crashes-consistently-due-to-a-sigsev-as-well-as-a-long-loop-of-createprocess-error-creating-process-handle/&do=findComment&comment=215368 That should be the cause of the server shutdowns. It'll be fixed in Ubuntu eventually, but in case you want to fix the root cause instead of remedying the symptom, you could upgrade your kernel.. Link to comment Share on other sites More sharing options...
Saner2oo2 4 Posted June 11, 2015 Share Posted June 11, 2015 mine is on 4.1 (albeit rc6, i need to update) and its still very crashy Link to comment Share on other sites More sharing options...
raptorjr 9 Posted June 11, 2015 Author Share Posted June 11, 2015 Thank you all. Much help and many good suggestions. In one way or another this will help me alot. Link to comment Share on other sites More sharing options...
JakeByr 5 Posted June 13, 2015 Share Posted June 13, 2015 I've been having trouble with the server crashing on me as well. Just posted some logs to hopefully get some light to shine on this. Link to comment Share on other sites More sharing options...
macntouch 0 Posted June 20, 2017 Share Posted June 20, 2017 I'm using daemontools under linux. It will monitor emby-server service status, and if the service is unreachable, it will restart automatically. It's working like a charm. Link to comment Share on other sites More sharing options...
Luke 36876 Posted June 20, 2017 Share Posted June 20, 2017 Thanks for the feedback. Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted June 20, 2017 Share Posted June 20, 2017 FWIW, recent flavors of Linux have moved to systemd, which offers auto-restart of units natively. I, and others here, have had great success w/ monit as well. But since the OP is over 2 years old, and most of what I've said is already covered above, I digress. Link to comment Share on other sites More sharing options...
macntouch 0 Posted June 21, 2017 Share Posted June 21, 2017 Auto-restart in systemd is not bullet-proof, i tried to tune the emby-server.service for auto-restart, but it always fails. I had to use daemontools which monitor the service and restart when the service goes down. My two cents. Link to comment Share on other sites More sharing options...
tlmr_guest 0 Posted March 1, 2018 Share Posted March 1, 2018 Auto-restart in systemd is not bullet-proof, i tried to tune the emby-server.service for auto-restart, but it always fails. I had to use daemontools which monitor the service and restart when the service goes down. My two cents. Hi macntouch, can you guide me how can I add emby service in daemontools? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now