Jump to content

systemd restart behavior on failure


Recommended Posts

Posted

Hi,

 

after any update i have to edit /lib/systemd/system/emby-server.service because the default restart behavior is set to "on-abort". But sometimes emby is crashing and will not be restarted with this setting, so please change it for example to this:

[Unit]Description=Emby Media Server
After=network.target


[Service]
ExecStart=/usr/bin/emby-server start
Restart=always
RestartSec=10
TimeoutSec=20
ExecStopPost=/usr/bin/emby-server clear


[Install]
WantedBy=multi-user.target

Thank you,

Best Regards, Stefan

 
Posted (edited)
● emby-server.service - Emby Media Server

   Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)

   Active: failed (Result: exit-code) since Thu 2017-07-06 03:41:46 CEST; 3h 57min ago

  Process: 27721 ExecStopPost=/usr/bin/emby-server clear (code=exited, status=0/SUCCESS)

 Main PID: 17513 (code=exited, status=134)

 

Jul 06 03:41:46 servername systemd[1]: emby-server.service: Main process exited, code=exited, status=134/n/a

Jul 06 03:41:46 servername systemd[1]: emby-server.service: Unit entered failed state.

Jul 06 03:41:46 servername systemd[1]: emby-server.service: Failed with result 'exit-code'.

Edited by OKDaG
Posted (edited)

There's two issues here:

 

1) Emby shouldn't be failing after an upgrade that's a problem that you should probably look into.

2) Updates actually implicitly stop the Emby service and that will also prevent Emby from loading back up again. See here: https://emby.media/community/index.php?/topic/48966-emby-crashing-fedora-25/&do=findComment&comment=470441 again not that anyone listens.

 

However if modifying the service works for you great - little advice take a copy and put it into /etc/systemd/system that'll override  /lib/systemd/system/ and you'll be safe from updates. Oh and make sure to run systemctl daemon-reload after you've done this.

Edited by dcrdev
  • 2 weeks later...
Posted

1) Emby is not failing after an upgrade, it is failing after a while running and only sometimes

2) it's ok that updates will stop and start emby

 

This request is to change the service file within the emby deb package to the example mentioned in the first post.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...