Page 1 of 1

SAB not autostarting in ubuntu

Posted: November 3rd, 2013, 1:26 pm
by 0lek
Dears,

I have searched this forum, looked everywhere and used IGS (intensive google search). However, I cannot get this to work. It's driving me nuts. If started manually, all is fine. However, autostart using System V is not working. It is starting up, as I see the rc2.d script in processes, seconds later the correct python execution of sab, but then it's gone.

My setup:
  • Ubuntu 3.8.0-32-generic
  • SABNZDplus ubuntu package 0.7.16
  • SABNZDPlus started via System V (/etc/init.d/sabnzdplus)
  • SABNZDPlus started as user xbmc
/etc/default/sabnzdplus:

Code: Select all

# [required] user or uid of account to run the program as:
USER=xbmc

# [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=
init.d script is vanilla.

Running sudo sh -x /etc/init.d/sabnzbdplus start fails:

http://pastebin.com/2u8ttzLy

If anybody can help, that'd be terrific, as I do not know what possibly is wrong.

Thanks and BR
0lek

Re: SAB not autostarting in ubuntu

Posted: November 3rd, 2013, 2:11 pm
by sander
What is the result of:

Code: Select all

su - xbmc
whoami
sabnzbdplus

Re: SAB not autostarting in ubuntu

Posted: November 4th, 2013, 11:42 am
by 0lek
Hi,

The result is sabnzbdplus starting up:

Code: Select all

olek@sasha:~$ su - xbmc
Password: 
xbmc@sasha:~$ whoami
xbmc
xbmc@sasha:~$ sabnzbdplus
2013-11-04 20:23:29,644::INFO::[sabnzbdplus:1244] --------------------------------
2013-11-04 20:23:29,646::INFO::[sabnzbdplus:1245] sabnzbdplus-0.7.16 (rev=14f39a21e3aa063d128f16505032e759c7ba3265)
2013-11-04 20:23:29,647::INFO::[sabnzbdplus:1257] Platform = posix
2013-11-04 20:23:29,649::INFO::[sabnzbdplus:1258] Python-version = 2.7.4 (default, Sep 26 2013, 03:20:56) 
[GCC 4.7.3]
2013-11-04 20:23:29,652::INFO::[sabnzbdplus:1259] Arguments = /usr/bin/sabnzbdplus
2013-11-04 20:23:29,653::INFO::[sabnzbdplus:1272] Read INI file /home/xbmc/.sabnzbd/sabnzbd.ini
2013-11-04 20:23:29,660::INFO::[__init__:928] Loading data for bookmarks.sab from /home/xbmc/.sabnzbd/admin/bookmarks.sab
2013-11-04 20:23:29,662::INFO::[__init__:928] Loading data for rss_data.sab from /home/xbmc/.sabnzbd/admin/rss_data.sab
2013-11-04 20:23:29,664::INFO::[__init__:928] Loading data for totals9.sab from /home/xbmc/.sabnzbd/admin/totals9.sab
2013-11-04 20:23:29,665::INFO::[__init__:931] /home/xbmc/.sabnzbd/admin/totals9.sab missing, trying old cache
2013-11-04 20:23:29,667::INFO::[__init__:934] /home/xbmc/.sabnzbd/cache/totals9.sab missing
2013-11-04 20:23:29,709::INFO::[postproc:90] Loading postproc queue
2013-11-04 20:23:29,711::INFO::[__init__:928] Loading data for postproc1.sab from /home/xbmc/.sabnzbd/admin/postproc1.sab
2013-11-04 20:23:29,716::INFO::[__init__:928] Loading data for queue9.sab from /home/xbmc/.sabnzbd/admin/queue9.sab
2013-11-04 20:23:29,722::INFO::[__init__:928] Loading data for watched_data.sab from /home/xbmc/.sabnzbd/admin/watched_data.sab
2013-11-04 20:23:29,728::INFO::[scheduler:172] Setting schedule for midnight BPS reset
2013-11-04 20:23:29,730::INFO::[downloader:211] Resuming
2013-11-04 20:23:29,760::INFO::[__init__:330] All processes started
2013-11-04 20:23:29,762::INFO::[sabnzbdplus:335] Web dir is /usr/share/sabnzbdplus/interfaces/Plush
2013-11-04 20:23:29,765::INFO::[sabnzbdplus:335] Web dir is /usr/share/sabnzbdplus/interfaces/Config
2013-11-04 20:23:29,792::INFO::[sabnzbdplus:451] _yenc module... found!
2013-11-04 20:23:29,794::INFO::[sabnzbdplus:459] par2 binary... found (/usr/bin/par2)
2013-11-04 20:23:29,796::INFO::[sabnzbdplus:467] unrar binary... found (/usr/bin/unrar)
2013-11-04 20:23:29,798::INFO::[sabnzbdplus:472] unzip binary... found (/usr/bin/unzip)
2013-11-04 20:23:29,800::INFO::[sabnzbdplus:478] nice binary... found (/usr/bin/nice)
2013-11-04 20:23:29,802::INFO::[sabnzbdplus:482] ionice binary... found (/usr/bin/ionice)
2013-11-04 20:23:29,804::INFO::[sabnzbdplus:487] pyOpenSSL... found (True)
2013-11-04 20:23:29,810::INFO::[sabnzbdplus:1471] Starting web-interface on 0.0.0.0:8080
2013-11-04 20:23:29,813::INFO::[_cplogging:55] [04/Nov/2013:20:23:29] ENGINE Bus STARTING
2013-11-04 20:23:29,829::INFO::[_cplogging:55] [04/Nov/2013:20:23:29] ENGINE Started monitor thread '_TimeoutMonitor'.
2013-11-04 20:23:30,045::INFO::[_cplogging:55] [04/Nov/2013:20:23:30] ENGINE Serving on 0.0.0.0:8080
2013-11-04 20:23:30,050::INFO::[_cplogging:55] [04/Nov/2013:20:23:30] ENGINE Bus STARTED
2013-11-04 20:23:30,558::INFO::[sabnzbdplus:1540] Starting sabnzbdplus-0.7.16
2013-11-04 20:23:30,564::INFO::[dirscanner:274] Dirscanner starting up
2013-11-04 20:23:30,568::INFO::[urlgrabber:77] URLGrabber starting up
What I have done yesterday, I removed the package, removed the scripts and re-installed it. So no above, just the installed package.
I actually re-installed it now, but cannot get it to create the init.d scripts. Tried using https://gist.github.com/joshenders/4181257, but they won't start.

I'm starting to think about installing from source.

OK, I fixed it. I basically just purged it, restarted and re-installed it:

Code: Select all

sudo apt-get purge sabnzbdplus
sudo shutdown -r now
sudo apt-get install sabnzbdplus
So far so good, hope that's all.

Thank you a thousand times for your help!

All the best!

Re: SAB not autostarting in ubuntu

Posted: November 4th, 2013, 11:50 am
by sander
So it works when you start it as user xbmc from the command line. Correct?

What is the output of

Code: Select all

sudo service sabnzbdplus restart
I cannot help you if you get scripts from other sources. I only know plain SABnzbd

Re: SAB not autostarting in ubuntu

Posted: November 4th, 2013, 11:59 am
by 0lek
You were too fast. I edited the last post saying that I fixed it by purging+reinstalling.

See above.