SABnzbd not starting on Ubuntu 14.04

Get help with all aspects of SABnzbd
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
petri0
Newbie
Newbie
Posts: 10
Joined: May 30th, 2016, 12:15 am

SABnzbd not starting on Ubuntu 14.04

Post by petri0 »

Have had this installed and working a couple of years now but suddenly it fails to start. Here's the lines when I try to start it manually:

Code: Select all

~ $ sudo service sabnzbdplus restart
[sudo] password for : 
 * SABnzbd+ binary newsgrabber: not running
 * Starting SABnzbd+ binary newsgrabber                                         Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 86, in <module>
    import sabnzbd
  File "/usr/share/sabnzbdplus/sabnzbd/__init__.py", line 78, in <module>
    from sabnzbd.nzbqueue import NzbQueue
  File "/usr/share/sabnzbdplus/sabnzbd/nzbqueue.py", line 29, in <module>
    from sabnzbd.nzbstuff import NzbObject
  File "/usr/share/sabnzbdplus/sabnzbd/nzbstuff.py", line 48, in <module>
    from sabnzbd.misc import to_units, cat_to_opts, cat_convert, sanitize_foldername, \
  File "/usr/share/sabnzbdplus/sabnzbd/misc.py", line 44, in <module>
    import sabnzbd.config as config
  File "/usr/share/sabnzbdplus/sabnzbd/config.py", line 30, in <module>
    import configobj
ImportError: No module named configobj
                                                                         [fail]
EDIT: What have I done?
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: SABnzbd not starting on Ubuntu 14.04

Post by jcfp »

Looks like something wrong with the configobj module, try reinstalling that:

Code: Select all

sudo apt-get install --reinstall python-configobj
petri0
Newbie
Newbie
Posts: 10
Joined: May 30th, 2016, 12:15 am

Re: SABnzbd not starting on Ubuntu 14.04

Post by petri0 »

Thank you for responding, unfortunately the error remains

Code: Select all

~ $ sudo service sabnzbdplus restart
[sudo] password for : 
 * SABnzbd+ binary newsgrabber: not running
 * Starting SABnzbd+ binary newsgrabber                                         Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 1893, in <module>
    main()
  File "/usr/bin/sabnzbdplus", line 1063, in main
    res, msg = config.read_config(inifile)
  File "/usr/share/sabnzbdplus/sabnzbd/decorators.py", line 31, in newFunction
    return f(*args, **kw)
  File "/usr/share/sabnzbdplus/sabnzbd/config.py", line 692, in read_config
    return _read_config(path)
  File "/usr/share/sabnzbdplus/sabnzbd/config.py", line 740, in _read_config
    CFG = configobj.ConfigObj(lines, default_encoding='cp1252', encoding='cp1252')
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1230, in __init__
    self._load(infile, configspec)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1290, in _load
    infile = self._handle_bom(infile)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1400, in _handle_bom
    return self._decode(infile, self.encoding)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1497, in _decode
    infile[i] = line.decode(encoding)
LookupError: unknown encoding: cp1252
                                                                         [fail]
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd not starting on Ubuntu 14.04

Post by sander »

LookupError: unknown encoding: cp1252
... so that's a different error, isn't it?

Let's check your python setup:
Start

Code: Select all

python
and type

Code: Select all

'hello'.encode('cp1251')
Post the result here.

This is from my Ubuntu 14.04:

Code: Select all

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 'hello'.encode('cp1251')
'hello'
>>> 
petri0
Newbie
Newbie
Posts: 10
Joined: May 30th, 2016, 12:15 am

Re: SABnzbd not starting on Ubuntu 14.04

Post by petri0 »

Yes it is different ... I was thinking about the result which was fail.

This is my result

Code: Select all

~ $ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 'hello'.encode('cp1251')
'hello'
>>>
Could this be something with my hardware? It is getting a little old and now my HDD:s have started to "disappear". I have to go to "Discs" to wake them up and to mount them. Not all of them but one Raid0 and one encrypted. I even installed another Mint 17.3 to a new partition using the same /home though and sabnzb is still failing to start. Is there something in my home partition that might causing sabnzb to fail?
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd not starting on Ubuntu 14.04

Post by sander »

Well, the problem is outside SABnzbd, and in your Python / system setup. Not very SABnzbd related. Hopefully not an intermittent error, as those are very hard to solve.

Anyway ... as that command did NOT cause the same error, let's try this:

In python, execute these commands:

Code: Select all

import configobj
lines = "blabla\n"
CFG = configobj.ConfigObj(lines, default_encoding='cp1252', encoding='cp1252')
print CFG
Result on my Ubuntu 14.04:

Code: Select all

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import configobj
>>> lines = "blabla\n"
>>> CFG = configobj.ConfigObj(lines, default_encoding='cp1252', encoding='cp1252')
>>> print CFG
{}
>>> 
So, no error. What does your system say?
petri0
Newbie
Newbie
Posts: 10
Joined: May 30th, 2016, 12:15 am

Re: SABnzbd not starting on Ubuntu 14.04

Post by petri0 »

That's good to know because I like SABnzbd. I wonder how did I mess up my python. Maybe following the guides for Plex in htpcguides.com


Mine looks the same as yours

Code: Select all

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import configobj
>>> lines = "blabla\n"
>>> CFG = configobj.ConfigObj(lines, default_encoding='cp1252', encoding='cp1252')
>>> print CFG
{}
>>>
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd not starting on Ubuntu 14.04

Post by sander »

Wow. No error. Weird.

And if you start sabnzbd, you get the error again?!
petri0
Newbie
Newbie
Posts: 10
Joined: May 30th, 2016, 12:15 am

Re: SABnzbd not starting on Ubuntu 14.04

Post by petri0 »

Yes the error is still the same as last time. Now it's starting to sound like a reinstallation is needed.
EDIT: Meaning reinstall the whole OS not just SABnzbd which I have already tried to a couple of times.

Code: Select all

$ sudo service sabnzbdplus restart
[sudo] password for : 
 * SABnzbd+ binary newsgrabber: not running
 * Starting SABnzbd+ binary newsgrabber                                         Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 1893, in <module>
    main()
  File "/usr/bin/sabnzbdplus", line 1063, in main
    res, msg = config.read_config(inifile)
  File "/usr/share/sabnzbdplus/sabnzbd/decorators.py", line 31, in newFunction
    return f(*args, **kw)
  File "/usr/share/sabnzbdplus/sabnzbd/config.py", line 692, in read_config
    return _read_config(path)
  File "/usr/share/sabnzbdplus/sabnzbd/config.py", line 740, in _read_config
    CFG = configobj.ConfigObj(lines, default_encoding='cp1252', encoding='cp1252')
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1230, in __init__
    self._load(infile, configspec)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1290, in _load
    infile = self._handle_bom(infile)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1400, in _handle_bom
    return self._decode(infile, self.encoding)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1497, in _decode
    infile[i] = line.decode(encoding)
LookupError: unknown encoding: cp1252
                                                                         [fail]
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd not starting on Ubuntu 14.04

Post by sander »

Yes, I would try that.
petri0
Newbie
Newbie
Posts: 10
Joined: May 30th, 2016, 12:15 am

Re: SABnzbd not starting on Ubuntu 14.04

Post by petri0 »

It is the last resort coming too close. The funny thing is that I already installed a separate version which is using the same home partition and the trouble continues. This error message above is pointing at root folders but can there be something in my home folders that is spreading this disease because the new installation is having the same problem?
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd not starting on Ubuntu 14.04

Post by sander »

Worth a try (1% chance it will give useful info): start sabnzbd with a fresh, new ini.

So:
Make sure SAB is not running, then:

Code: Select all

sabnzbdplus -f sab-some-test.ini
Fill out the wizard, do a download, stop SABnzbd, and start it again with

Code: Select all

sabnzbdplus -f sab-some-test.ini
Does that work, or do you get an error message?
petri0
Newbie
Newbie
Posts: 10
Joined: May 30th, 2016, 12:15 am

Re: SABnzbd not starting on Ubuntu 14.04

Post by petri0 »

Thanks sander but now I can't even get to my Desktop. Got to install this OS and everything else. Luckily this isn't MS Windows and won't take rest of the week... :)
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: SABnzbd not starting on Ubuntu 14.04

Post by jcfp »

petri0 wrote:Could this be something with my hardware? It is getting a little old and now my HDD:s have started to "disappear". I have to go to "Discs" to wake them up and to mount them.
petri0 wrote:now I can't even get to my Desktop.
99% chance your issues are caused by broken hardware. No point in just reinstalling and watching it fail again after.
Post Reply