1

I followed this guide to upgrade to Debian Jessie.

Since upgrading, sabznbdplus & plexmediaserver are no longer starting on startup. They can both be started by running their files in /etc/init.d/

sabnzbdplus runs from it's python source in a folder in my users home folder, and plexmediaserver is from the unofficial source listed in their forums.

Does anyone know where I can start looking for the issue?

Edit

After running the enable service commands, plexmediaserver is now working on startup but sabnzbplus isn't, here is the output from the stauts command.

sudo systemctl status sabnzbdplus.service
● sabnzbdplus.service - LSB: Starts Sabnzbd
   Loaded: loaded (/etc/init.d/sabnzbdplus)
   Active: failed (Result: exit-code) since Sat 2017-02-11 21:34:12 GMT; 11min ago
  Process: 850 ExecStart=/etc/init.d/sabnzbdplus start (code=exited, status=203/EXEC)

Feb 11 21:34:12 NAS systemd[850]: Failed at step EXEC spawning /etc/init.d/sabnzbdplus: Exec format error
Feb 11 21:34:12 NAS systemd[1]: sabnzbdplus.service: control process exited, code=exited status=203
Feb 11 21:34:12 NAS systemd[1]: Failed to start LSB: Starts Sabnzbd.
Feb 11 21:34:12 NAS systemd[1]: Unit sabnzbdplus.service entered failed state.

edit 2

head /etc/init.d/sabnzbdplus
### BEGIN INIT INFO
# Provides: sabnzbdplus
# Required-Start: networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts Sabnzbd
# Description:
### END INIT INFO
  • Please include the output of head /etc/init.d/sabnzbdplus as well. – Ferenc Wágner Feb 13 '17 at 7:37
  • Added to the main post. – xreyuk Feb 13 '17 at 21:14
  • This init script misses the shebang line, I wonder how it could work even before the upgrade. Try inserting #!/bin/sh as its first line (see other scripts in /etc/init.d for a reference). Or switch to using native systemd units as suggested by GAD3R in the other answer. – Ferenc Wágner Feb 14 '17 at 9:02
  • Thanks, that fixed it. It was further down in the script, not in the header for some reason. – xreyuk Feb 15 '17 at 16:10
0

You should enable the plexmediaserver.service and sabnzbdplus.service at boot :

Check the status:

systemctl status sabnzbdplus.service
systemctl status plexmediaserver.service

enable the service;

systemctl enable sabnzbdplus.service
systemctl enable plexmediaserver.service
  • Thanks! I didn't realise anything had changed. Do the status commands show the applications current status or do they show the status at startup? – xreyuk Feb 11 '17 at 21:26
  • I did the commands you said, and plexmediaserver now starts at startup, but sabnzbdplus doesn't, any idea where to go from here? I've edited the main comment with information from the status command for sabnzbplus. – xreyuk Feb 11 '17 at 21:45
0

Unless you made special effort, the upgrade switched you from SysV init to systemd. On one hand this may cause problems for local daemons; on the other it allows you to use systemd tools for troubleshooting. If your init scripts are named /etc/init.d/A and /etc/init.d/B, the corresponding systemd units will be A.service and B.service. So as a first step, run systemctl -n100 -l status A and systemctl status -n100 -l B as root to find out their status. If the printed information does not help, share it with us (edit your question to include it). Also run journalctl and check /var/log/syslog for further clues.

  • Thanks. I didn't make a special effort to do anything different at startup. Could this be the reason mdadm isn't sending a startup email either? It used to send an email on startup and now it doesn't, but the service itself does start. I also noticed there are a load of frozen emails in exim4. – xreyuk Feb 11 '17 at 21:25
  • Also, do the status commands show the current status or the status at last startup? – xreyuk Feb 11 '17 at 21:32
  • The status command always shows the current status, and optionally the logs emitted during and since the last systemd operation on the unit. You can check those frozen mails with exim4 -Mvc <message ID>, but please open another question if you need further help with that. – Ferenc Wágner Feb 13 '17 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.