SAB won't auto start up on boot!

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
silentwol
Newbie
Newbie
Posts: 4
Joined: December 15th, 2010, 6:52 am

SAB won't auto start up on boot!

Post by silentwol »

I'm running sabnzbd on ubuntu. Here's what I've done:

Code: Select all

1. sudo aptitude install sabnzbdplus
2. configured /etc/default/sabnzbdplus
3. sudo /etc/init.d/sabnzbdplus sucessfully starts sab
However, on reboot, sab doesn't start up!

I run the following:

Code: Select all

$ sudo update-rc.d sabnzbdplus defaults
 System start/stop links for /etc/init.d/sabnzbdplus already exist.
Any idea why this isn't working?

Thanks!
silentwol
Newbie
Newbie
Posts: 4
Joined: December 15th, 2010, 6:52 am

Re: SAB won't auto start up on boot!

Post by silentwol »

Just looked in some log files (sorry, should have done this first!):

Code: Select all

Exception in thread HTTPServer Thread-10:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 75, in _start_http_thread
    self.httpserver.start()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1629, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address
I'm trying to bind to 192.168.1.100 (a static address assigned by DHCP).  This is a wireless connection, which takes a few seconds after boot to connect.  This seems to be the problem.

I'm considering just adding a sleep command to the init script... any better solutions?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: SAB won't auto start up on boot!

Post by shypike »

Yes, you need to wait for an IP address to be assigned before starting SABnzbd.
silentwol
Newbie
Newbie
Posts: 4
Joined: December 15th, 2010, 6:52 am

Re: SAB won't auto start up on boot!

Post by silentwol »

Adding a 'sleep 60' in the init script fixed it... maybe this could be handled more elegantly in sab? E.g. retry a few times (with suitable pause lengths) before giving up? There must be other people facing similar problems!
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: SAB won't auto start up on boot!

Post by shypike »

We get few complaints.
We will get new ones: "why does it take a full minute before I get feedback that my IP is wrong?"
silentwol
Newbie
Newbie
Posts: 4
Joined: December 15th, 2010, 6:52 am

Re: SAB won't auto start up on boot!

Post by silentwol »

shypike wrote: We get few complaints.
We will get new ones: "why does it take a full minute before I get feedback that my IP is wrong?"
How about, pseudo code:

Code: Select all

for(retry_count = 0; retry_count < 10; retry_count++)
{
    if(try_to_bind())
    {
        bound = true;
        break;
    }

    error_log "failed to bind, try retry_count"
    sleep 5
}

if(bound)
   everything good!

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

Re: SAB won't auto start up on boot!

Post by shypike »

It will still take a long time before any feedback can be given.
Post Reply