Cannot start service

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
xscode
Release Testers
Release Testers
Posts: 4
Joined: May 3rd, 2009, 8:37 am

Cannot start service

Post by xscode »

Hi all

I installed the package using the ppa and edited the /etc/defaults/sabnzbdplus file with my username but when I try to start the service it ails and a status shows "* SABnzbd+ binary newsgrabber: service not enabled, edit /etc/default/sabnzbdplus"

/etc/defaults/sabnzbdplus

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="stuart"

# [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=
PORT=

# [optional] extra command line options, if any:
EXTRAOPTS=
any ideas?

TIA
User avatar
jcfp
Release Testers
Release Testers
Posts: 1004
Joined: February 7th, 2008, 12:45 pm

Re: Cannot start service

Post by jcfp »

If you're on a recent ubuntu release using systemd, you may need to run the following or it won't pick up on the changes made:

Code: Select all

sudo systemctl daemon-reload
xscode
Release Testers
Release Testers
Posts: 4
Joined: May 3rd, 2009, 8:37 am

Re: Cannot start service

Post by xscode »

No difference after trying that I'm afraid.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1004
Joined: February 7th, 2008, 12:45 pm

Re: Cannot start service

Post by jcfp »

Then I'm at a loss. The init script does this check immediately after loading the config file from /etc/default:

Code: Select all

[ -z "${USER%:*}" ] && {
	log_action_msg "$DESC: service not enabled, edit $SETTINGS";
	return 1;
}
That code basically leaves three ways to trigger that msg: variable USER isn't set at all (i.e. commented out or deleted), it's set but empty (which is how the settings file comes in a fresh install of the package), or its value starts with a colon. The latter may happen as a typo with some common keyword layouts that have " and : next to each other. Or maybe it takes a reboot to get systemd back to reality...
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Cannot start service

Post by sander »

Trial-n-error suggestions from me:

Code: Select all

USER="stuart"
Does it work without the double quotes?
Does stuart exist?
What happens when you run "sabnzbdplus" from the commandline?
What is the output of "whoami"
xscode
Release Testers
Release Testers
Posts: 4
Joined: May 3rd, 2009, 8:37 am

Re: Cannot start service

Post by xscode »

Tried with and without quotes (I also tried my uid)
Stuart is the only account on the system
Sab runs fine from the command line as user stuart
Whoami returns stuart
User avatar
jcfp
Release Testers
Release Testers
Posts: 1004
Joined: February 7th, 2008, 12:45 pm

Re: Cannot start service

Post by jcfp »

No idea why it wouldn't work with the settings file from the topic start. That code I quoted hasn't changed at all since 2014.
Post Reply