Startup error on OSX

Report & discuss bugs found in 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.
gobo
Newbie
Newbie
Posts: 4
Joined: June 13th, 2012, 9:10 am

Startup error on OSX

Post by gobo »

Version: 0.7.0
OS: OS X Lion
Install-type: OSx .app
Are you using IPV6? yes
Is the issue reproducible? yes

I upgraded my Sabnzbd app. It worked fine before, I replaced it with the new version and now I'm greeted with an error when I try to start it:
SABnzbd.py 0.7.0

SABnzbd needs a valid host address for its internal web server.
You have specified an invalid address.
Safe values are localhost and 0.0.0.0

Please restart SABnzbd with a proper host address.

Open a Terminal window and type the line (example):
/CustomApps/SABnzbd.app/Contents/MacOS/SABnzbd --server localhost:8080

Program did not start!
Using that command line does not actually work, the only one that I've found to work is:

Code: Select all

    /CustomApps/SABnzbd.app/Contents/MacOS/SABnzbd --server ::1:8080
Then it works perfectly, but if I then try to start the application again by clicking on it, then it gives me the same error above.

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

Re: Startup error on OSX

Post by shypike »

It looks like "localhost" does not resolve on your system.
Does "ping 127.0.0.1" work from a Terminal window?

gobo
Newbie
Newbie
Posts: 4
Joined: June 13th, 2012, 9:10 am

Re: Startup error on OSX

Post by gobo »

shypike wrote:It looks like "localhost" does not resolve on your system.
Does "ping 127.0.0.1" work from a Terminal window?
Nope, that's not it:

Code: Select all

[[email protected]] ~% ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.071 ms

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

Re: Startup error on OSX

Post by shypike »

After you started it up successfully, which host address is in the sabnzbd.ini file?
Location: http://wiki.sabnzbd.org/configure-0-7

gobo
Newbie
Newbie
Posts: 4
Joined: June 13th, 2012, 9:10 am

Re: Startup error on OSX

Post by gobo »

shypike wrote:After you started it up successfully, which host address is in the sabnzbd.ini file?
Location: http://wiki.sabnzbd.org/configure-0-7
Weird. Now that it did startup succesfully, I can see that host=::1 in the config file, and it start succesfully each time from now on (even without the arguments). Now it also starts even with the localhost argument.
I was 100% sure that it didn't do that before.

Jazradel
Newbie
Newbie
Posts: 7
Joined: May 9th, 2012, 8:28 pm

Re: Startup error on OSX

Post by Jazradel »

I was having the same issue on 10.5.8 ppc. My host was 0.0.0.0 in the .ini file, changed it to ::1 and I could start it again.

Edit: Didn't work when I changed it back to 0.0.0.0, but did work with localhost. I have changed it to * and it seems to work fine now.

Kemik
Newbie
Newbie
Posts: 1
Joined: June 16th, 2012, 1:08 pm

Re: Startup error on OSX

Post by Kemik »

I got the same thing. The code suggested in the original post in terminal failed to work. I downgraded to the latest 0.6.* thinking it was a bug in the launch but apparently not.

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

Re: Startup error on OSX

Post by shypike »

Some OSX systems don't seem to know their own IP address.
Using 127.0.0.1 should always work.
SABnzbd's top menu symbol (the down arrow) now has a "Troubleshoot" menu, where
you can force 127.0.0.1:8080 to be used.

gobo
Newbie
Newbie
Posts: 4
Joined: June 13th, 2012, 9:10 am

Re: Startup error on OSX

Post by gobo »

shypike wrote:Some OSX systems don't seem to know their own IP address.
Using 127.0.0.1 should always work.
SABnzbd's top menu symbol (the down arrow) now has a "Troubleshoot" menu, where
you can force 127.0.0.1:8080 to be used.
I have a feeling it's "localhost" which doesn't seem to resolve always.

Adding a Troubleshoot menu in SABnbd's top menu is not helpful if it fails to launch...

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

Re: Startup error on OSX

Post by shypike »

Ever since OSX (and Windows too) let the DNS system determine the value of localhost,
things like this can go wrong.

The simplest fix is this:
From a Terminal window type:

Code: Select all

sudo echo 127.0.0.1 localhost >>/etc/hosts
BTW: and error in SABnzbd surfaced when on some Linux systems.
It may have a relation with your issue too.
It's under investigation.

bunhead
Newbie
Newbie
Posts: 3
Joined: June 17th, 2012, 7:06 am

Re: Startup error on OSX

Post by bunhead »

I can't get 0.7.0 to start on my OSX 10.6.4 server either. I was running all the previous versions without any issue before. Here is what I know so far.
  • My /etc/hosts file is fine

Code: Select all

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost 
fe80::1%lo0	localhost
  • I had disabled IPv6 but I enabled it and it in my network preference pannel and that had no effect, I still cannot start 0.7.0.
  • I can ping localhost and I can also ping 127.0.0.1
  • I have tried changing my host entry in the sabnzbd.ini file to 0.0.0.0, 127.0.0.1, ::1, * and my actual local IP address (192.168.1.75). None of these allowed me to start 0.7.0
  • I have tried the following CLI startup options

Code: Select all

/Applictions/SABnzbd.app/Contents/MacOS/SABnzbd --server ::1:8080

Code: Select all

/Applictions/SABnzbd.app/Contents/MacOS/SABnzbd --server localhost:8080

Code: Select all

/Applictions/SABnzbd.app/Contents/MacOS/SABnzbd --server 127.0.0.1:8080

Code: Select all

/Applictions/SABnzbd.app/Contents/MacOS/SABnzbd --server 192.168.1.75:8080

Code: Select all

/Applictions/SABnzbd.app/Contents/MacOS/SABnzbd
  • With all of those CLI startup options I get the following output in the terminal window

Code: Select all

Suzanne:~ admin$ /Applications/SABnzbd.app/Contents/MacOS/SABnzbd --server localhost:8080
INFO:root:Console logging for OSX App disabled
2012-06-17 08:20:28,613::INFO::[SABnzbd:1241] Console logging for OSX App disabled
Suzanne:~ admin$ 
  • If I put the --console option on my CLI startup command I get the following

Code: Select all

Suzanne:~ admin$ /Applications/SABnzbd.app/Contents/MacOS/SABnzbd --server localhost:8080 --console
INFO:root:--------------------------------
INFO:root:SABnzbd.py-0.7.0 (rev=d88b5a3b3e26beecaa4b7f8cbb5f2901de3d6024)
INFO:root:Platform = posix
INFO:root:Python-version = 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
INFO:root:Arguments = /Applications/SABnzbd.app/Contents/Resources/SABnzbd.py --server localhost:8080 --console
INFO:root:[osx] IO priority setting
INFO:root:[osx] IO priority set to throttle for process scope
INFO:root:Read INI file /Users/admin/Library/Application Support/SABnzbd/sabnzbd.ini
INFO:root:Loading data for bookmarks.sab from /Users/admin/Library/Application Support/SABnzbd/admin/bookmarks.sab
INFO:root:Loading data for rss_data.sab from /Users/admin/Library/Application Support/SABnzbd/admin/rss_data.sab
INFO:root:Loading data for totals9.sab from /Users/admin/Library/Application Support/SABnzbd/admin/totals9.sab
INFO:root:Loading postproc queue
INFO:root:Loading data for postproc1.sab from /Users/admin/Library/Application Support/SABnzbd/admin/postproc1.sab
INFO:root:Loading data for queue9.sab from /Users/admin/Library/Application Support/SABnzbd/admin/queue9.sab
INFO:root:Loading data for watched_data.sab from /Users/admin/Library/Application Support/SABnzbd/admin/watched_data.sab
INFO:root:Resuming
INFO:root:All processes started
INFO:root:Web dir is /Applications/SABnzbd.app/Contents/Resources/interfaces/Plush
INFO:root:Web dir is /Applications/SABnzbd.app/Contents/Resources/interfaces/Config
INFO:root:_yenc module... found!
INFO:root:par2 binary... found (/Applications/SABnzbd.app/Contents/Resources/osx/par2/par2-sl)
INFO:root:unrar binary... found (/Applications/SABnzbd.app/Contents/Resources/osx/unrar/unrar)
INFO:root:unzip binary... found (/usr/bin/unzip)
INFO:root:nice binary... found (/usr/bin/nice)
INFO:root:ionice binary... NOT found!
INFO:root:pyOpenSSL... found (True)
INFO:root:Starting web-interface on 0.0.0.0:8080
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus STARTING
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Started monitor thread '_TimeoutMonitor'.
ERROR:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Error in HTTP server: shutting down
Traceback (most recent call last):
  File "cherrypy/process/servers.pyc", line 75, in _start_http_thread
  File "cherrypy/wsgiserver/__init__.pyc", line 1644, in start
error: [Errno 49] Can't assign requested address

INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus STOPPING
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE HTTP Server None already shut down
ERROR:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Error in 'start' listener <bound method ServerAdapter.start of <cherrypy.process.servers.ServerAdapter object at 0x104760990>>
Traceback (most recent call last):
  File "cherrypy/process/wspbus.pyc", line 147, in publish
  File "cherrypy/process/servers.pyc", line 62, in start
  File "cherrypy/process/servers.pyc", line 97, in wait
error: [Errno 49] Can't assign requested address

INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('fe80::1%lo0', 8080)) already shut down
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Stopped thread '_TimeoutMonitor'.
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus STOPPED
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus EXITING
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus EXITED
Exception in thread HTTPServer Thread-10:
Traceback (most recent call last):
  File "threading.pyc", line 530, in __bootstrap_inner
  File "threading.pyc", line 483, in run
  File "cherrypy/process/servers.pyc", line 75, in _start_http_thread
  File "cherrypy/wsgiserver/__init__.pyc", line 1644, in start
error: [Errno 49] Can't assign requested address

INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Serving on 0.0.0.0:8080
ERROR:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
  File "cherrypy/process/wspbus.pyc", line 184, in start
  File "cherrypy/process/wspbus.pyc", line 147, in publish
  File "cherrypy/process/servers.pyc", line 62, in start
  File "cherrypy/process/servers.pyc", line 97, in wait
error: [Errno 49] Can't assign requested address

INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus STOPPING
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 8080)) shut down
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('fe80::1%lo0', 8080)) already shut down
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE No thread running for _TimeoutMonitor.
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus STOPPED
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus EXITING
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus EXITED
ERROR:root:Failed to start web-interface: 
Traceback (most recent call last):
  File "/Applications/SABnzbd.app/Contents/Resources/SABnzbd.py", line 1466, in main
  File "cherrypy/process/wspbus.pyc", line 184, in start
  File "cherrypy/process/wspbus.pyc", line 147, in publish
  File "cherrypy/process/servers.pyc", line 62, in start
  File "cherrypy/process/servers.pyc", line 97, in wait
error: [Errno 49] Can't assign requested address
ERROR:root:Failed to start web-interface : [Errno 49] Can't assign requested address
INFO:root:SABnzbd shutting down...
INFO:root:Saving data for bookmarks.sab in /Users/admin/Library/Application Support/SABnzbd/admin/bookmarks.sab
INFO:root:URLGrabber shutting down
INFO:root:Saving data for watched_data.sab in /Users/admin/Library/Application Support/SABnzbd/admin/watched_data.sab
INFO:root:Dirscanner shutting down
INFO:root:Saving postproc queue
INFO:root:Saving data for postproc1.sab in /Users/admin/Library/Application Support/SABnzbd/admin/postproc1.sab
INFO:root:Saving queue
INFO:root:Saving data for queue9.sab in /Users/admin/Library/Application Support/SABnzbd/admin/queue9.sab
INFO:root:Saving data for totals9.sab in /Users/admin/Library/Application Support/SABnzbd/admin/totals9.sab
INFO:root:Saving data for rss_data.sab in /Users/admin/Library/Application Support/SABnzbd/admin/rss_data.sab
INFO:root:Saving data for bookmarks.sab in /Users/admin/Library/Application Support/SABnzbd/admin/bookmarks.sab
INFO:root:Saving data for watched_data.sab in /Users/admin/Library/Application Support/SABnzbd/admin/watched_data.sab
INFO:root:Saving postproc queue
INFO:root:Saving data for postproc1.sab in /Users/admin/Library/Application Support/SABnzbd/admin/postproc1.sab
INFO:root:All processes stopped
2012-06-17 08:21:46.216 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x10454ab80 of class NSCFString autoreleased with no pool in place - just leaking
2012-06-17 08:21:46.220 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x104533c60 of class NSURL autoreleased with no pool in place - just leaking
2012-06-17 08:21:46.221 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x1040147d0 of class OC_PythonString autoreleased with no pool in place - just leaking
2012-06-17 08:21:46.225 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x10406aaf0 of class NSCFData autoreleased with no pool in place - just leaking
2012-06-17 08:21:46.226 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x104545ee0 of class NSCFString autoreleased with no pool in place - just leaking
2012-06-17 08:21:46.227 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x10406a5d0 of class NSURL autoreleased with no pool in place - just leaking
2012-06-17 08:21:46.227 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x1040147d0 of class OC_PythonString autoreleased with no pool in place - just leaking
2012-06-17 08:21:46.228 SABnzbd[28975:3307] *** __NSAutoreleaseNoPool(): Object 0x10454b220 of class NSCFData autoreleased with no pool in place - just leaking
INFO:root:[osx] application terminating
INFO:root:[osx] application stopping daemon
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus STOPPING
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 8080)) already shut down
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('fe80::1%lo0', 8080)) already shut down
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE No thread running for _TimeoutMonitor.
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus STOPPED
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus EXITING
INFO:cherrypy.error:[17/Jun/2012:08:21:46] ENGINE Bus EXITED
INFO:root:Leaving SABnzbd
Suzanne:~ admin$ 
I am at a loss here and I am not sure what my next steps are. I can and have rolled back to 0.6.15 because that is the only backup version I have of SABnzbd. Any ideas, or other directions to go in?

bunhead
Newbie
Newbie
Posts: 3
Joined: June 17th, 2012, 7:06 am

Re: Startup error on OSX

Post by bunhead »

FOUND IT! It seems my /etc/hosts file was to blame. I was looking at the output of the CLI startup with the --console output and I noticed that SABnzbd was trying to start two instances one for 0.0.0.0 and one for fe80::1%lo0. I have no idea what fe80::1%lo0 is so I made a backup of my /etc/hosts file and then removed the entry and now SABnzbd starts and works just fine ;D .

Code: Select all

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255   broadcasthost
::1             localhost 
fe80::1%lo0   localhost
I changed it to

Code: Select all

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255   broadcasthost
::1             localhost
Incase you don't know how to make a backup of your /etc/hosts file here is how you do it.

Code: Select all

sudo cp /etc/hosts /etc/hosts.backup
Then you can modify it using any text editor you like as long as you sudo the command, I like vi because I am old and that is what I am used to ;D

Code: Select all

sudo vi /etc/hosts
SABnzbd starts fine now but I am not sure what, if any implications this will have to other application(s) running on my system. I will update if I find any negative effects.

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

Re: Startup error on OSX

Post by shypike »

bunhead wrote:FOUND IT! It seems my /etc/hosts file was to blame.
Strictly speaking the "fe80::1%lo0" entry isn't wrong.
However, normally there are no localhost entries in /etc/hosts
because DNS is supposed to take care of those.

When I enter all those localhost entries into my /etc/hosts, things keep working as before.

BTW: what is shown when you type?
uname -n
and can you ping the name shown?

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

Re: Startup error on OSX

Post by shypike »

bunhead wrote:I can't get 0.7.0 to start on my OSX 10.6.4 server either.
Same question.
What does "uname -n" show?
And can you ping the resulting name?

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

Re: Startup error on OSX

Post by shypike »

Do any of you run VMWare's Fusion on your OSX system?
(I had a lot of problems with Fusion 3 messing up the network stack.)

Post Reply