Page 1 of 1
Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 3rd, 2020, 4:29 am
by cable_guy
Hi all,
I can run sabnzbdplus -s 0.0.0.0 and it works, but I can't seem to get it to run on startup via systemctl. I'm sure it's something simple I'm missing.
When I run "sudo systemctl status sabnzbdplus", I get
Code: Select all
● sabnzbdplus.service - LSB: SABnzbd+ binary newsgrabber
Loaded: loaded (/etc/init.d/sabnzbdplus; generated)
Active: active (exited) since Mon 2020-08-03 08:45:50 UTC; 40min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0 (limit: 6804)
Memory: 0B
CGroup: /system.slice/sabnzbdplus.service
Aug 03 08:45:49 servername systemd[1]: Starting LSB: SABnzbd+ binary newsgrabber...
Aug 03 08:45:50 servername sabnzbdplus[755]: * SABnzbd+ binary newsgrabber: service not enabled, edit /etc/default/sabnzbdplus
Aug 03 08:45:50 servername systemd[1]: Started LSB: SABnzbd+ binary newsgrabber.
I have edited /etc/default/sabnzbdplus and added my user and added 0.0.0.0 to the host, yet I still get the above message.
Any hints i'd be grateful for. thanks in advance
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 3rd, 2020, 6:13 am
by sander
Can you post your /etc/default/sabnzbdplus here?
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 3rd, 2020, 10:17 am
by cable_guy
sure, thanks for the reply!
Code: Select all
# This file is sourced by /etc/init.d/sabnzbdplus
#
# When SABnzbd+ is started using the init script, the
# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.
# [required] user or uid of account to run the program as:
USER=ricardo
# [optional] full path to the configuration file of your choice;
# otherwise, the default location (in $USER's home
# directory) is used:
CONFIG=
# [optional] hostname/ip and port number to listen on:
HOST=0.0.0.0
PORT=8089
# [optional] extra command line options, if any:
EXTRAOPTS=
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 3rd, 2020, 10:53 am
by sander
Does user ricardo exist? Normal user? With normal rights?
Reason: "service not enabled" comes from /etc/init.d/sabnzbdplus:
Code: Select all
load_settings() {
if [ -z "$USER" ]; then
. "$SETTINGS"
[ -z "${USER%:*}" ] && {
log_action_msg "$DESC: service not enabled, edit $SETTINGS";
return 1;
}
My /bin/sh scripting knowledge is very limited, but I think "-z" means zero / does not exit. I don't know what the USER% means ...
EDIT:
Hmmm. When I fill out a non-existing user name, I get different output. So your problem must be different too.
Code: Select all
sander@brixit:~$ sudo service sabnzbdplus restart
Job for sabnzbdplus.service failed because the control process exited with error code.
See "systemctl status sabnzbdplus.service" and "journalctl -xe" for details.
Code: Select all
sander@brixit:~$ systemctl status sabnzbdplus.service
● sabnzbdplus.service - LSB: SABnzbd+ binary newsgrabber
Loaded: loaded (/etc/init.d/sabnzbdplus; generated)
Active: failed (Result: exit-code) since Mon 2020-08-03 17:54:04 CEST; 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 13484 ExecStart=/etc/init.d/sabnzbdplus start (code=exited, status=1/FAILURE)
aug 03 17:54:04 brixit systemd[1]: Starting LSB: SABnzbd+ binary newsgrabber...
aug 03 17:54:04 brixit sabnzbdplus[13505]: start-stop-daemon: user 'fhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh' not found
aug 03 17:54:04 brixit systemd[1]: sabnzbdplus.service: Control process exited, code=exited, status=1/FAILURE
aug 03 17:54:04 brixit systemd[1]: sabnzbdplus.service: Failed with result 'exit-code'.
aug 03 17:54:04 brixit systemd[1]: Failed to start LSB: SABnzbd+ binary newsgrabber.
sander@brixit:~$
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 3rd, 2020, 12:06 pm
by cable_guy
yes ricardo exists with root privileges too (bad practise, i know)
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 3rd, 2020, 2:02 pm
by sander
Did you google "service not enabled" & sabnzbd? Gives info that looks useful.
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 5th, 2020, 2:48 pm
by cable_guy
sander wrote: ↑August 3rd, 2020, 2:02 pm
Did you google "service not enabled" & sabnzbd? Gives info that looks useful.
yes i've tried a few things and can't work it out.
E.g. I run sudo systemctl start sabnzbdplus, Sab doesn't start, then I run "journalctl -xe | grep sab" to try and see why it hasn't started, but I don't get any entry related to my manual attempt to start at all.
I noticed something strange when I ran "systemctl list-unit-files | grep enabled | grep sab", sabnzbdplus.service is listed as "generated enabled" rather than enabled enabled. I don't know why as I've ran "sudo systemctl enable sabnzbdplus" and get just:
Code: Select all
sabnzbdplus.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable sabnzbdplus"
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 5th, 2020, 11:01 pm
by sander
Back to the basics: how it is possible you got into this problem? Because I have Ubuntu 20.04, and for me the SABnzbd start-at-boot works out of the box.
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 7th, 2020, 6:19 am
by cable_guy
sander wrote: ↑August 5th, 2020, 11:01 pm
Back to the basics: how it is possible you got into this problem? Because I have Ubuntu 20.04, and for me the SABnzbd start-at-boot works out of the box.
It's a brand new build so shiould be easy to get back toscratch. Followed some advice I came across which I felt uneasy about at the time by adding a repo in which apparently does "dev" builds to get newer features quicker. Something like "jcbs", I wonder if that was bad advice
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 7th, 2020, 9:05 am
by sander
Ah, OK.
Some notes:
Ubuntu 20.04 has already a SAB3 version. Although a pre-alpha, it's there, and it should work.
PPA by JCFP is for uptodate versions of SAB. This PPA offers two versions as explained on
https://sabnzbd.org/wiki/installation/i ... buntu-repo
Choose either the nobetas channel, to receive only final stable releases:
sudo add-apt-repository ppa:jcfp/nobetas
Or if you wish to recieve alpha/beta/rc releases, go for the regular option:
sudo add-apt-repository ppa:jcfp/ppa
HTH
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 7th, 2020, 9:11 am
by cable_guy
sander wrote: ↑August 7th, 2020, 9:05 am
Ah, OK.
Some notes:
Ubuntu 20.04 has already a SAB3 version. Although a pre-alpha, it's there, and it should work.
PPA by JCFP is for uptodate versions of SAB. This PPA offers two versions as explained on
https://sabnzbd.org/wiki/installation/i ... buntu-repo
Choose either the nobetas channel, to receive only final stable releases:
sudo add-apt-repository ppa:jcfp/nobetas
Or if you wish to recieve alpha/beta/rc releases, go for the regular option:
sudo add-apt-repository ppa:jcfp/ppa
HTH
thanks that is useful advice, for sure. I can't recall if i chose ppa or nobetas.
Would you advise right now to burn the server and start again, or uninstall and try and reinstall from Ubuntu's official apt repo?
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 8th, 2020, 3:48 am
by sander
Reinstall ... yes, then in 15 minutes you have a fresh install and guides should work.
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 10th, 2020, 10:13 am
by cable_guy
sander wrote: ↑August 8th, 2020, 3:48 am
Reinstall ... yes, then in 15 minutes you have a fresh install and guides should work.
thanks for the advice, I uninstalled, reinstalled and like you said in 15 mins i was up and running, I just needed to populate my sab ini file, and it autostarted on boot, with no intervention from me. Goodness knows how I got into this mess, but I wanted to say I am sorted now and thank you.
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: August 10th, 2020, 10:22 am
by sander
Cool!!!
Re: Can't get Sab to autostart on bootup on Ubuntu 20
Posted: September 9th, 2020, 8:43 pm
by Quagwa
Since we are talking about auto starting, are you using version 3.x.x of sabnzbd, it isn't the same procedure for setting up autostart as previous versions (2.x.x). I am also using Ubuntu 20.04 LTS without a GUI. I did a little more research and found a service file located in the installation directory: sabnzbd/linux/
[email protected]
"sudo nano" to that file, and there are instructions that will help you configure auto start for sabnzbd. I was finally able to get sabnzbd to autoload if my server reboots now.
It took all of about 10 minutes once I found the file and understood what configuration was needed in the file.
