Page 1 of 1

Unable to start as a service suddenly [Raspi]

Posted: July 27th, 2017, 8:38 pm
by rsouthgate
Had sab installed on osmc on a Rasp Pi for ages... Suddenly failing to start as a service. journalctl tells me it's a segmentation fault:

Code: Select all

-- Unit sabnzbdplus.service has begun starting up.
Jul 28 13:29:49 osmclounge sabnzbdplus[28783]: Segmentation fault
Jul 28 13:29:49 osmclounge systemd[1]: sabnzbdplus.service: control process exited, code=exited status=1
Jul 28 13:29:49 osmclounge systemd[1]: Failed to start LSB: SABnzbd+ binary newsgrabber.
-- Subject: Unit sabnzbdplus.service has failed
-- Defined-By: systemd
-- 
-- Unit sabnzbdplus.service has failed.
-- 
-- The result is failed.
Yet, it still quite happily starts if I type sabnzbdplus at the command prompt. osmc uses apt-get dist-upgrade in the background to update stuff, so i'm wondering if it's updated a lib that sab uses which is causing the issue... but I would have thought then that it would be complaining regardless of how it was started.

Equally, if it was some hardware memory issue I would have thought it would complain either way!

Any pointers appreciated.

Re: Unable to start as a service suddenly [Raspi]

Posted: July 28th, 2017, 5:57 am
by sander
As SABnzbd is a python program, I'm surprised if it could to generate a segfault....

Which OS / Linux version exactly is on your Raspi? Raspbian? ... ?

How did you setup the Linux daemon/service? Via /etc/default/sabnzbdplus ? Can you check & post the contents?

osmclounge is the name of your Raspi system, right?

Re: Unable to start as a service suddenly [Raspi]

Posted: July 29th, 2017, 12:04 am
by rsouthgate
It's OSMC which is Debian Jessie with a skinned version of kodi on top:

Code: Select all

osmc@osmclounge:~$ lsb_release -da
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 8.9 (jessie)
Release:	8.9
Codename:	jessie
Installation was through the ppa nobetas repo using apt-get (I had to use the trusty target which apparently equates to jessie) - install and updates have been fine up to now. Can't remember exactly how I installed the service - from memory it was just copy the service file to /etc/init.d or something

Here is the contents of the sabnzbdplus config (/etc/default/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=osmc

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

# [optional] extra command line options, if any:
EXTRAOPTS=
Pretty minimal config! But it's been working fine for a long time.

And yes - osmclounge is the network name of the pi.

Cheers

Re: Unable to start as a service suddenly [Raspi]

Posted: July 29th, 2017, 2:40 pm
by sander
I don't know.

If you think it's caused by an upgrade of sabnzbd, you can check the current version:

Code: Select all

apt-cache policy sabnzbdplus
and install a specific older version with:

Code: Select all

sudo apt-get install sabnzbdplus=...

Re: Unable to start as a service suddenly [Raspi]

Posted: July 29th, 2017, 4:45 pm
by rsouthgate
Thanks but I don't think it's an upgrade of SABnzbd plus that has caused it, more likely I think the OSMC auto updated has updated a library that sab uses which is where the segmentation fault would be occurring. I can't see any likely candidates though! Might be time for a full reinstall.