Gentoo SABnzbd start problems

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
edik
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 3:29 pm

Gentoo SABnzbd start problems

Post by edik »

Hallo,

I have some problems with getting your nice tool started under linux.

My system is a gentoo installation and i'm using the latest sabnzbd ebuild from the c1pher overlay.

After emerging sabnzbd I tried to start it with /etc/init.d/sabnzbd start.

Then I get this :
* Caching service dependencies ... [ ok ]
* Use of the opts variable is deprecated and will be
* removed in the future.
* Please use extra_commands, extra_started_commands or extra_stopped_commands.
* Starting SABnzbd ... [ !! ]
* ERROR: sabnzbd failed to start
Then I tried to start it manually with this command
/usr/bin/python2.7 SABnzbd.py -d -f /etc/sabnzbd/sabnzbd.ini --pid /var/run/sabnzbd/
I can reach SABnzbd through localhost:8080.
At step one I want to test my inputs an there comes only: Testing server details... And no result.
At step four I get this error message:
500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "/usr/local/src/sabnzbd/cherrypy/_cprequest.py", line 618, in respond
cherrypy.response.body = self.handler()
File "/usr/local/src/sabnzbd/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/usr/local/src/sabnzbd/sabnzbd/wizard.py", line 201, in four
info['access_url'], info['urls'] = self.get_access_info()
File "/usr/local/src/sabnzbd/sabnzbd/wizard.py", line 219, in get_access_info
addresses = socket.getaddrinfo(host, None)
gaierror: [Errno -2] Name or service not known

Powered by CherryPy 3.2.0
Here the log file:
2012-02-06 04:47:29,755::INFO::[SABnzbd:1207] --------------------------------
2012-02-06 04:47:29,756::INFO::[SABnzbd:1208] SABnzbd.py-0.6.15 (rev=d06f957a0f05a8766822acaa6de1f6d1e9f279e0)
2012-02-06 04:47:29,756::INFO::[SABnzbd:1220] Platform = posix
2012-02-06 04:47:29,756::INFO::[SABnzbd:1221] Python-version = 2.7.2 (default, Feb 4 2012, 19:28:23) [GCC 4.5.3]
2012-02-06 04:47:29,756::INFO::[SABnzbd:1222] Arguments = "SABnzbd.py", "-d", "-f", "/etc/sabnzbd/sabnzbd.ini", "--pid", "/var/run/sabnzbd/"
2012-02-06 04:47:29,756::INFO::[SABnzbd:1235] Read INI file /etc/sabnzbd/sabnzbd.ini
2012-02-06 04:47:29,757::INFO::[__init__:870] Loading data for bookmarks.sab from /var/lib/sabnzbd/admin/bookmarks.sab
2012-02-06 04:47:29,758::INFO::[__init__:870] Loading data for rss_data.sab from /var/lib/sabnzbd/admin/rss_data.sab
2012-02-06 04:47:29,758::INFO::[__init__:870] Loading data for totals9.sab from /var/lib/sabnzbd/admin/totals9.sab
2012-02-06 04:47:29,758::INFO::[__init__:873] /var/lib/sabnzbd/admin/totals9.sab missing, trying old cache
2012-02-06 04:47:29,758::INFO::[__init__:876] /var/lib/sabnzbd/cache/totals9.sab missing
2012-02-06 04:47:29,772::INFO::[postproc:89] Loading postproc queue
2012-02-06 04:47:29,772::INFO::[__init__:870] Loading data for postproc1.sab from /var/lib/sabnzbd/admin/postproc1.sab
2012-02-06 04:47:29,772::INFO::[__init__:870] Loading data for queue9.sab from /var/lib/sabnzbd/admin/queue9.sab
2012-02-06 04:47:29,772::INFO::[__init__:870] Loading data for watched_data.sab from /var/lib/sabnzbd/admin/watched_data.sab
2012-02-06 04:47:29,773::INFO::[downloader:194] Resuming
2012-02-06 04:47:29,773::INFO::[__init__:289] All processes started
2012-02-06 04:47:29,773::INFO::[SABnzbd:331] Web dir is /usr/local/src/sabnzbd/interfaces/Plush
2012-02-06 04:47:29,782::INFO::[SABnzbd:454] _yenc module... found!
2012-02-06 04:47:29,782::INFO::[SABnzbd:462] par2 binary... found (/usr/bin/par2)
2012-02-06 04:47:29,782::INFO::[SABnzbd:470] unrar binary... found (/usr/bin/unrar)
2012-02-06 04:47:29,782::INFO::[SABnzbd:475] unzip binary... found (/usr/bin/unzip)
2012-02-06 04:47:29,782::INFO::[SABnzbd:481] nice binary... found (/usr/bin/nice)
2012-02-06 04:47:29,783::INFO::[SABnzbd:485] ionice binary... found (/usr/bin/ionice)
2012-02-06 04:47:29,783::INFO::[SABnzbd:490] pyOpenSSL... found (True)
2012-02-06 04:47:29,784::INFO::[SABnzbd:1402] Starting web-interface on 0.0.0.0:8080
2012-02-06 04:47:29,785::INFO::[_cplogging:55] [06/Feb/2012:04:47:29] ENGINE Bus STARTING
2012-02-06 04:47:29,787::INFO::[_cplogging:55] [06/Feb/2012:04:47:29] ENGINE Started monitor thread '_TimeoutMonitor'.
2012-02-06 04:47:29,888::INFO::[_cplogging:55] [06/Feb/2012:04:47:29] ENGINE Serving on 0.0.0.0:8080
2012-02-06 04:47:29,888::INFO::[_cplogging:55] [06/Feb/2012:04:47:29] ENGINE Bus STARTED
2012-02-06 04:47:30,276::INFO::[SABnzbd:1471] Starting SABnzbd.py-0.6.15
2012-02-06 04:47:30,277::INFO::[dirscanner:263] Dirscanner starting up
2012-02-06 04:47:30,277::INFO::[urlgrabber:75] URLGrabber starting up
2012-02-06 04:56:15,901::WARNING::[interface:166] Missing Session key
2012-02-06 04:57:56,665::WARNING::[interface:166] Missing Session key
2012-02-06 04:58:04,967::INFO::[_cplogging:55] [06/Feb/2012:04:58:04] HTTP
Request Headers:
AUTHORIZATION: Basic dGhpc2lzbm90OnRoZXBhc3N3b3Jk
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: application/x-www-form-urlencoded
REFERER: http://192.168.178.36:8080/wizard/three
HOST: 192.168.178.36:8080
Content-Length: 55
ACCEPT-CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.7
USER-AGENT: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111107 Ubuntu/10.10 (maverick) Firefox/3.6.24
CONNECTION: keep-alive
Remote-Addr: 192.168.178.31
ACCEPT-LANGUAGE: en-us,en;q=0.5
ACCEPT-ENCODING: gzip,deflate
KEEP-ALIVE: 115
2012-02-06 04:58:04,967::DEBUG::[_cplogging:55] [06/Feb/2012:04:58:04] HTTP Traceback (most recent call last):
File "/usr/local/src/sabnzbd/cherrypy/_cprequest.py", line 618, in respond
cherrypy.response.body = self.handler()
File "/usr/local/src/sabnzbd/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/usr/local/src/sabnzbd/sabnzbd/wizard.py", line 201, in four
info['access_url'], info['urls'] = self.get_access_info()
File "/usr/local/src/sabnzbd/sabnzbd/wizard.py", line 219, in get_access_info
addresses = socket.getaddrinfo(host, None)
gaierror: [Errno -2] Name or service not known
I seems to me that this is a network issue, but I don't know the reason. There is no firewall running.
Maybe a name resolving issue?

I hope you have any ideas :)

Thank you,
edik
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Gentoo SABnzbd start problems

Post by shypike »

It looks like localhost is not defined on your system. Try 127.0.0.1 instead.
Not quite sure, because SABnzbd should detect that situation now.
edik
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 3:29 pm

Re: Gentoo SABnzbd start problems

Post by edik »

Name resolving for localhost is correct in my system.

I tried 127.0.0.1 in /etc/conf.d/sabnzbd, but the same errors occur.

Sometimes when I restart the deamon, than I get an 'ascii' error. I cannot reproduce this error, it happens randomly.

Is it correct, if I specify port 8081 at /etc/conf.d/sabnzbd, but sabnzbd is only reachable through localhost:8080 ? At localhost:8081 I get a browser Unable to connect error?

thanks
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Gentoo SABnzbd start problems

Post by shypike »

The code crashes when it tries to determine all available host address variants.
Somehow your hostname doesn't resolve.
Can you test this mini python program?

Code: Select all

import socket
host = socket.gethostname()
print host
addresses = socket.getaddrinfo(host, None)
print addresses
Put in in a file called testhost.py
then run this:
python testhost.py
edik
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 3:29 pm

Re: Gentoo SABnzbd start problems

Post by edik »

This is the result:
tux
Traceback (most recent call last):
File "test.py", line 4, in <module>
addresses = socket.getaddrinfo(host, None)
socket.gaierror: [Errno -2] Name or service not known
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Gentoo SABnzbd start problems

Post by sander »

See the last comment on http://forums.gentoo.org/viewtopic-t-802967.html about /etc/nsswitch.conf on gentoo. Does that help?
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Gentoo SABnzbd start problems

Post by sander »

And: do you get the same results as I get:

Code: Select all

sander@R540:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> print socket.getaddrinfo('doesnotexist', None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
>>> print socket.getaddrinfo('127.0.0.1', None)
[(2, 1, 6, '', ('127.0.0.1', 0)), (2, 2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))]
>>> print socket.getaddrinfo('localhost', None)
[(2, 1, 6, '', ('127.0.0.1', 0)), (2, 2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))]
>>>
edik
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 3:29 pm

Re: Gentoo SABnzbd start problems

Post by edik »

Hey sander,

I have checked already my nsswitch.conf according the post from gentoo forum, my entries are "hosts: files dns".

Here is the result for your code example and it seems to be the same as you get:
Python 2.7.2 (default, Feb 4 2012, 19:28:23)
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> print socket.getaddrinfo('doesnotexist', None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
>>> print socket.getaddrinfo('127.0.0.1', None)
[(2, 1, 6, '', ('127.0.0.1', 0)), (2, 2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))]
>>> print socket.getaddrinfo('localhost', None)
[(2, 1, 6, '', ('127.0.0.1', 0)), (2, 2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))]
>>> print socket.getaddrinfo('tux', None)
[(2, 1, 6, '', ('127.0.0.1', 0)), (2, 2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))]
I extended my /etc/hosts with the entry "127.0.0.1 tux".

At wizard:
When I choose german as language than I get this error:
2012-02-06 22:34:15,641::ERROR::[_cplogging:178] [06/Feb/2012:22:34:15] HTTP Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 645, in respond
response.body = self.handler()
File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 29, in __call__
return self.callable(*self.args, **self.kwargs)
File "/usr/share/sabnzbd-0.6.1/sabnzbd/wizard.py", line 198, in four
return template.respond()
File "_usr_share_sabnzbd_interfaces_wizard_four_html.py", line 115, in respond
TypeError: not all arguments converted during string formatting
For english as language there is no error, I only get warnings like this when i move through the wizard:
2012-02-06 22:31:48,447::WARNING::[interface:165] Missing Session key
2012-02-06 22:31:56,467::WARNING::[interface:165] Missing Session key
2012-02-06 22:31:59,977::WARNING::[interface:165] Missing Session key
At step 4 he suggest me http://127.0.0.1:8080/sabnzbd/ but this redirects me again to http://127.0.0.1:8080/wizard/.
Was this intended?

greets
edik
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: Gentoo SABnzbd start problems

Post by jcfp »

edik wrote:2012-02-06 04:47:29,756::INFO::[SABnzbd:1208] SABnzbd.py-0.6.15 (rev=d06f957a0f05a8766822acaa6de1f6d1e9f279e0)
edik wrote:When I choose german as language than I get this error:
[...]
File "/usr/share/sabnzbd-0.6.1/sabnzbd/wizard.py", line 198, in four
??? Gentoo may not be my hobby, but I sure hope that version mixup is a typo on your end...
edik
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 3:29 pm

Re: Gentoo SABnzbd start problems

Post by edik »

It's on my end.:)
I had problems with 0.6.10 from the overlay, so I tried 0.6.15, but the errors are the same.
I forgot to reset the logs, sorry my fault.

I'm working here on 0.6.1 not 0.6.15.
edik
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 3:29 pm

Re: Gentoo SABnzbd start problems

Post by edik »

Ok! I got it to run. Thank you very much. :) :D
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Gentoo SABnzbd start problems

Post by sander »

edik wrote:Ok! I got it to run. Thank you very much. :) :D
How?
edik
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 3:29 pm

Re: Gentoo SABnzbd start problems

Post by edik »

Ok here are the things that helped me:

For the issue with the wizard loop I had to specify at least one usenet server in /etc/sabnzbd/sabnzbd.ini manually, the wizard havn't wrote it. That fixed it.

Than I used another ebuild than that in the c1pher overlay to get a newer version.

You find this ebuild at this location: https://bugs.gentoo.org/132590

After completing the wizard and restarting sabnzbd the first time, which only worked for me with english language, I got to the sabnzbd main view and there I couldn't change(save) any configs or else, because of an Missing session key.

The solution for that is also described in the ebuild comments, under comment number 107, but for completion:

1. in your configuration file (/etc/sabnzbd/sabnzbd.ini for me), set your api key to "abcd".
2. browse to [1] to generate a new api key.

See [2] or [3] for explanations.

[1] http://localhost:8080/api?mode=config&n ... pikey=abcd
[2] http://forums.sabnzbd.org/viewtopic.php?p=57375#p57375
[3] http://forums.sabnzbd.org/viewtopic.php?t=1960

The hint for the Session key problem I got from this post:
http://forums.sabnzbd.org/viewtopic.php ... Key#p60852

I hope this will help somebody in the future. :)

The only thing that isn't working at the moment is the service start stop script in /etc/init.d/sabnzbd provided by the ebuild. But this is also mentioned in the ebuild comments, it is one of the last ones, comment 118 i think.

greets
edik
Post Reply