Page 1 of 1

Can no longer update Sab and it fails to start via systemctl

Posted: March 30th, 2022, 9:23 pm
by Airwolf
Operating System: Ubuntu 20.04.4 LTS
Installed Sab version: 3.5.3
Repo: http://ppa.launchpad.net/jcfp/nobetas/ubuntu

I am having a problem where when I run apt update on my Sab server, I am getting the following error. I have this configured on Ubuntu 20.04.4 LTS. I am able to access the Sab web interface, which is odd considering this error. It is just preventing me from upgrading via apt.

Code: Select all

Setting up sabnzbdplus (3.5.3-0ubuntu1~jcfp1~20.04) ...
Job for sabnzbdplus.service failed because the control process exited with error code.
See "systemctl status sabnzbdplus.service" and "journalctl -xe" for details.
invoke-rc.d: initscript sabnzbdplus, action "restart" failed.
● sabnzbdplus.service - LSB: SABnzbd+ binary newsgrabber
     Loaded: loaded (/etc/init.d/sabnzbdplus; generated)
     Active: failed (Result: exit-code) since Mon 2022-03-28 04:13:32 MDT; 17ms ago
       Docs: man:systemd-sysv-generator(8)
    Process: 1606094 ExecStart=/etc/init.d/sabnzbdplus start (code=exited, status=2)

Mar 28 04:13:29 cloudplex systemd[1]: Starting LSB: SABnzbd+ binary newsgrabber...
Mar 28 04:13:30 cloudplex sabnzbdplus[1606094]:  * Starting SABnzbd+ binary newsgrabber
Mar 28 04:13:32 cloudplex sabnzbdplus[1606094]:    ...fail!
Mar 28 04:13:32 cloudplex systemd[1]: sabnzbdplus.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Mar 28 04:13:32 cloudplex systemd[1]: sabnzbdplus.service: Failed with result 'exit-code'.
Mar 28 04:13:32 cloudplex systemd[1]: Failed to start LSB: SABnzbd+ binary newsgrabber.
dpkg: error processing package sabnzbdplus (--configure):
 installed sabnzbdplus package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 sabnzbdplus
E: Sub-process /usr/bin/dpkg returned an error code (1)    
When I use journalctl -xe, I see the same exact output as above and no mention of where the invalid argument is coming from or what line it is on.

I looked in /var/log/syslog and I see the following showing that Sab is starting with no problems, despite the error in apt and systemctl. I can also access the Sabnzbd page.

Code: Select all

2022-03-28 04:17:52,596::INFO::[sabnzbdplus:1168] sabnzbdplus-3.5.3
2022-03-28 04:17:52,598::INFO::[sabnzbdplus:1178] Commit = bca9f3b753f2d68263ca62c5b677d63458ba56c2
2022-03-28 04:17:52,600::INFO::[sabnzbdplus:1180] Full executable path = /usr/bin/sabnzbdplus
2022-03-28 04:17:52,600::INFO::[sabnzbdplus:1181] Arguments = "/usr/bin/sabnzbdplus" "--browser" "0"
2022-03-28 04:17:52,600::INFO::[sabnzbdplus:1182] Python-version = 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0]
2022-03-28 04:17:52,600::INFO::[sabnzbdplus:1183] Dockerized = False
2022-03-28 04:17:52,601::INFO::[sabnzbdplus:1184] CPU architecture = x86_64
2022-03-28 04:17:52,659::INFO::[sabnzbdplus:1187] Platform = posix - Linux-5.4.0-104-generic-x86_64-with-glibc2.29
2022-03-28 04:17:52,659::INFO::[sabnzbdplus:1193] Preferred encoding = UTF-8
2022-03-28 04:17:52,660::INFO::[sabnzbdplus:1212] SSL version = OpenSSL 1.1.1f  31 Mar 2020
2022-03-28 04:17:52,669::INFO::[sabnzbdplus:1221] Certifi version = 2019.11.28
2022-03-28 04:17:52,669::INFO::[sabnzbdplus:1222] Loaded additional certificates from /etc/ssl/certs/ca-certificates.crt
2022-03-28 04:17:52,670::INFO::[sabnzbdplus:1242] Using INI file /root/.sabnzbd/sabnzbd.ini
2022-03-28 04:17:52,681::INFO::[postproc:133] Loading postproc queue
2022-03-28 04:17:52,683::INFO::[scheduler:188] Scheduling RSS interval task every 60 min (delay=11)
2022-03-28 04:17:52,683::INFO::[scheduler:204] Setting schedule for midnight BPS reset
2022-03-28 04:17:52,684::INFO::[scheduler:207] Setting schedule for server expiration check
2022-03-28 04:17:52,684::INFO::[scheduler:212] Setting scheduler for server quota check
2022-03-28 04:17:52,696::INFO::[config:910] Writing settings to INI file /root/.sabnzbd/sabnzbd.ini
2022-03-28 04:17:52,705::INFO::[__init__:321] All processes started
2022-03-28 04:17:52,706::INFO::[sabnzbdplus:337] Template location for Glitter is /usr/share/sabnzbdplus/interfaces/Glitter
2022-03-28 04:17:52,707::INFO::[sabnzbdplus:337] Template location for Config is /usr/share/sabnzbdplus/interfaces/Config
2022-03-28 04:17:52,709::INFO::[misc:1163] [N/A] Running external command: ['/usr/bin/unrar']
2022-03-28 04:17:52,755::INFO::[misc:1163] [N/A] Running external command: ['/usr/bin/7za']
2022-03-28 04:17:52,785::INFO::[misc:1163] [N/A] Running external command: ['/usr/bin/par2', '-h']
2022-03-28 04:17:52,804::INFO::[sabnzbdplus:424] SABYenc module (v4.0.1)... found!
2022-03-28 04:17:52,804::INFO::[sabnzbdplus:443] Cryptography module (v2.8)... found!
2022-03-28 04:17:52,805::INFO::[sabnzbdplus:448] par2 binary... found (/usr/bin/par2)
2022-03-28 04:17:52,805::INFO::[sabnzbdplus:455] UNRAR binary... found (/usr/bin/unrar)
2022-03-28 04:17:52,805::INFO::[sabnzbdplus:463] UNRAR binary version 5.61
2022-03-28 04:17:52,806::INFO::[sabnzbdplus:471] 7za binary... found (/usr/bin/7za)
2022-03-28 04:17:52,806::INFO::[sabnzbdplus:473] 7za binary version 16.02
2022-03-28 04:17:52,806::INFO::[sabnzbdplus:484] nice binary... found (/usr/bin/nice)
2022-03-28 04:17:52,807::INFO::[sabnzbdplus:488] ionice binary... found (/usr/bin/ionice)
2022-03-28 04:17:52,814::INFO::[sabnzbdplus:1431] Starting web-interface on redactedip:8081
2022-03-28 04:17:52,814::INFO::[_cplogging:219] [28/Mar/2022:04:17:52] ENGINE Bus STARTING
2022-03-28 04:17:52,820::INFO::[_cplogging:219] [28/Mar/2022:04:17:52] ENGINE Started monitor thread '_TimeoutMonitor'.
2022-03-28 04:17:52,943::INFO::[_cplogging:219] [28/Mar/2022:04:17:52] ENGINE Serving on http://redactedip:8081
2022-03-28 04:17:52,944::INFO::[_cplogging:219] [28/Mar/2022:04:17:52] ENGINE Bus STARTED
2022-03-28 04:17:52,945::INFO::[sabnzbdplus:1470] Starting sabnzbdplus-3.5.3
2022-03-28 04:17:52,961::INFO::[dirscanner:117] Dirscanner starting up
2022-03-28 04:17:52,967::INFO::[notifier:123] Sending notification: SABnzbd - SABnzbd 3.5.3 started (type=startup, job_cat=None)
This is what my sabnzbd.service unit file looks like in /etc/systemd/system

Code: Select all

[Unit]
Description=SABnzbd Usenet Client
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/python3 -OO /usr/bin/sabnzbdplus --browser 0
ExecStop=/usr/bin/pkill sabnzbdplus
Restart=always
SyslogIdentifier=SABnzbd Usenet Client

[Install]
WantedBy=multi-user.target
I am having a heck of a time figuring out what is wrong here and if anybody might be able to assist with this issue, it would be greatly appreciated.

Re: Can no longer update Sab and it fails to start via systemctl

Posted: March 31st, 2022, 11:29 am
by jcfp
The ubuntu package ships only an init.d script by the name of sabnzbdplus, that takes its configuration from /etc/default/sabnzbdplus. This service is the one that shows up in your upgrade log. The sabnzbd.service file you posted on the other hand is a manual addition, which will be deemed a separate service (rather than a "native" replacement of the init script) by systemd because it goes by a different name.

This combination of multiple different services managing a single program/service results in undefined behaviour.

Re: Can no longer update Sab and it fails to start via systemctl

Posted: April 2nd, 2022, 8:15 pm
by Airwolf
jcfp wrote: March 31st, 2022, 11:29 am The ubuntu package ships only an init.d script by the name of sabnzbdplus, that takes its configuration from /etc/default/sabnzbdplus. This service is the one that shows up in your upgrade log. The sabnzbd.service file you posted on the other hand is a manual addition, which will be deemed a separate service (rather than a "native" replacement of the init script) by systemd because it goes by a different name.

This combination of multiple different services managing a single program/service results in undefined behaviour.
Thank you for your help. I deleted the sabnzbd.service file and did systemctl disable sabnzbd.service. Problem was fixed after that and a reboot.