Page 1 of 1
SAB won't auto start up on boot!
Posted: December 15th, 2010, 6:55 am
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!
Re: SAB won't auto start up on boot!
Posted: December 15th, 2010, 7:00 am
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?
Re: SAB won't auto start up on boot!
Posted: December 15th, 2010, 7:12 am
by shypike
Yes, you need to wait for an IP address to be assigned before starting SABnzbd.
Re: SAB won't auto start up on boot!
Posted: December 15th, 2010, 7:14 am
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!
Re: SAB won't auto start up on boot!
Posted: December 15th, 2010, 9:18 am
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?"
Re: SAB won't auto start up on boot!
Posted: December 16th, 2010, 7:12 am
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!
Re: SAB won't auto start up on boot!
Posted: December 16th, 2010, 9:34 am
by shypike
It will still take a long time before any feedback can be given.