Service does not work on the Pi

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
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Service does not work on the Pi

Post by FreeFun »

Hi,

I can't get the service running right. When I start it as a Pi user, everything looks okay but I can't open it in the browser! Not even as root user!

Code: Select all

pi@raspberry:~ $ service sabnzbdplus status
● sabnzbdplus.service - LSB: SABnzbd+ binary newsgrabber
   Loaded: loaded (/etc/init.d/sabnzbdplus; generated)
   Active: active (exited) since Mon 2020-07-13 18:19:36 CEST; 45s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 16192 ExecStart=/etc/init.d/sabnzbdplus start (code=exited, status=0/SUCCESS)

Jul 13 18:19:09 raspberry systemd[1]: Starting LSB: SABnzbd+ binary newsgrabber...
Jul 13 18:19:36 raspberry sabnzbdplus[16192]: Starting SABnzbd+ binary newsgrabber:.
Jul 13 18:19:36 raspberry systemd[1]: Started LSB: SABnzbd+ binary newsgrabber.
As root I can run sabnzbdplus without problems but not as a Pi user.

Code: Select all

pi@raspberry:~ $ sabnzbdplus
2020-07-13 18:34:38,095::INFO::[sabnzbdplus:1146] --------------------------------
2020-07-13 18:34:38,096::INFO::[sabnzbdplus:1147] sabnzbdplus-2.3.6 (rev=190ec0a472eddca58698fc3504503c6252337c40)
2020-07-13 18:34:38,097::INFO::[sabnzbdplus:1148] Full executable path = /usr/bin/sabnzbdplus
2020-07-13 18:34:38,099::INFO::[sabnzbdplus:1158] Platform = posix
2020-07-13 18:34:38,099::INFO::[sabnzbdplus:1159] Python-version = 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0]
2020-07-13 18:34:38,100::INFO::[sabnzbdplus:1160] Arguments = /usr/bin/sabnzbdplus
2020-07-13 18:34:38,101::INFO::[sabnzbdplus:1165] Preferred encoding = UTF-8
2020-07-13 18:34:38,102::INFO::[sabnzbdplus:1175] SSL version = OpenSSL 1.1.1d  10 Sep 2019
2020-07-13 18:34:38,103::INFO::[sabnzbdplus:1223] Read INI file /home/pi/.sabnzbd/sabnzbd.ini
2020-07-13 18:34:38,139::INFO::[postproc:100] Loading postproc queue
2020-07-13 18:34:38,143::INFO::[__init__:985] [N/A] /home/pi/.sabnzbd/admin/Rating.sab missing
2020-07-13 18:34:38,145::INFO::[scheduler:197] Setting schedule for midnight BPS reset
2020-07-13 18:34:38,146::INFO::[__init__:349] All processes started
2020-07-13 18:34:38,147::INFO::[sabnzbdplus:286] Web dir is /usr/share/sabnzbdplus/interfaces/Glitter
2020-07-13 18:34:38,148::INFO::[sabnzbdplus:286] Web dir is /usr/share/sabnzbdplus/interfaces/Config
2020-07-13 18:34:38,160::INFO::[config:853] Writing settings to INI file /home/pi/.sabnzbd/sabnzbd.ini
2020-07-13 18:34:38,202::INFO::[sabnzbdplus:397] SABYenc module (v3.3.5)... found!
2020-07-13 18:34:38,203::INFO::[sabnzbdplus:414] Cryptography module (v2.6.1)... found!
2020-07-13 18:34:38,203::INFO::[sabnzbdplus:419] par2 binary... found (/usr/bin/par2)
2020-07-13 18:34:38,204::INFO::[sabnzbdplus:429] UNRAR binary... found (/usr/bin/unrar)
2020-07-13 18:34:38,204::INFO::[sabnzbdplus:437] UNRAR binary version 5.61
2020-07-13 18:34:38,205::INFO::[sabnzbdplus:442] unzip binary... found (/usr/bin/unzip)
2020-07-13 18:34:38,205::INFO::[sabnzbdplus:447] 7za binary... found (/usr/bin/7za)
2020-07-13 18:34:38,205::INFO::[sabnzbdplus:453] nice binary... found (/usr/bin/nice)
2020-07-13 18:34:38,206::INFO::[sabnzbdplus:457] ionice binary... found (/usr/bin/ionice)
2020-07-13 18:34:38,208::INFO::[sabnzbdplus:1379] Starting web-interface on sabnzbd.local:8080
2020-07-13 18:34:38,209::INFO::[_cplogging:219] [13/Jul/2020:18:34:38] ENGINE Bus STARTING
2020-07-13 18:34:58,422::ERROR::[_cplogging:219] [13/Jul/2020:18:34:58] ENGINE Error in HTTP server: shutting down
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 207, in _start_http_thread
    self.httpserver.start()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 2012, in start
    raise socket.error(msg)
error: No socket could be created -- (('sabnzbd.local', 8080): [Errno -2] Der Name oder der Dienst ist nicht bekannt)

2020-07-13 18:34:58,430::INFO::[_cplogging:219] [13/Jul/2020:18:34:58] ENGINE Bus STOPPING
2020-07-13 18:34:58,431::INFO::[_cplogging:219] [13/Jul/2020:18:34:58] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('sabnzbd.local', 8080)) already shut down
2020-07-13 18:34:58,432::INFO::[_cplogging:219] [13/Jul/2020:18:34:58] ENGINE Bus STOPPED
2020-07-13 18:34:58,433::INFO::[_cplogging:219] [13/Jul/2020:18:34:58] ENGINE Bus EXITING
2020-07-13 18:34:58,434::INFO::[_cplogging:219] [13/Jul/2020:18:34:58] ENGINE Bus EXITED
pi@raspberry:~ $
The two problems are certainly connected but I do not see it.

Best regards
FreeFun
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Service does not work on the Pi

Post by sander »

What if you start with

sabnzbdplus -s 0.0.0.0:8080 -b1
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Re: Service does not work on the Pi

Post by FreeFun »

Yeah that worked! :D

And how do I solve the autostart problem as a service?
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Service does not work on the Pi

Post by sander »

FreeFun wrote: July 13th, 2020, 2:15 pm Yeah that worked! :D

And how do I solve the autostart problem as a service?
Did you follow https://sabnzbd.org/wiki/installation/i ... buntu-repo -> "How To Run as a Service" -> "If you want the program to be started as a service (i.e., in the background on system boot), edit (as root) the text file /etc/default/sabnzbdplus and set the required USER= " ... ?
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Re: Service does not work on the Pi

Post by FreeFun »

I already have USER=pi there, but the service still does not work!
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Service does not work on the Pi

Post by sander »

How do you know the service does not work? I see no error in your "service sabnzbdplus status" ...
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Re: Service does not work on the Pi

Post by FreeFun »

If I start it normally "sabnzbdplus -s 0.0.0.0:8080 -b1" I can call it via "raspberry:8080" but when I start the service it does not work!
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Service does not work on the Pi

Post by sander »

From another machine, you mean?

On the Raspi, what is the output of:

sudo netstat -apon | grep LISTEN | grep -vi LISTENING
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Re: Service does not work on the Pi

Post by FreeFun »

sander wrote: July 13th, 2020, 4:16 pm From another machine, you mean?
I call "raspberry:8080" on my Windows PC
sander wrote: July 13th, 2020, 4:16 pm sudo netstat -apon | grep LISTEN | grep -vi LISTENING
Port 8080 and sabnzbdplus is not listed there!

Add:
I think this is the same problem as when user Pi calls sabnzbdplus without arguments (sabnzbdplus -s 0.0.0.0:8080 -b1) that he gets soket errors like in the first post!
Image
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Service does not work on the Pi

Post by sander »

Ah, I do see a problem in your output: "Active: active (exited)"

Anyway: what is the result of:

sudo service sabnzbdplus restart
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Re: Service does not work on the Pi

Post by FreeFun »

Nothing just silence
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Service does not work on the Pi

Post by sander »

OK, then I give up. Raspi / Raspbian is not easy, especially if you're coming from Windows.
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Re: Service does not work on the Pi

Post by FreeFun »

Problem solved!

In the file /etc/default/sabnzbdplus it could not handle the hostname.

Code: Select all

HOST=sabnzbd.local
changed to

Code: Select all

HOST=0.0.0.0
Now the service also works under the Pi user! ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
User avatar
FreeFun
Newbie
Newbie
Posts: 11
Joined: May 31st, 2019, 4:53 am

Re: Service does not work on the Pi

Post by FreeFun »

The service does not start automatically after the reboot.
Post Reply