Page 1 of 1

Crashes over and over; segmentation fault? hostname?

Posted: February 6th, 2012, 6:00 pm
by RT1000
Hello, I am running a server with SABNZBDplus, just downloaded it yesterday, so it should be the newest version... The following happens after awhile:
First it crashes, and is inaccessible from the browser interface. So i SSH back into the terminal and try to start it up as a daemon

Code: Select all

> sudo /etc/init.d/sabnzbdplus start
 * Starting SABnzbd+ binary newsgrabber
Segmentation fault
   ...fail!
I don't know much about python, but I saw elsewhere on the forums that Segmentation Faults are not common.

Here's my sabnzbd.error.log:

Code: Select all

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, 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 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, 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 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, 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 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, 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 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, 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 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread CP WSGIServer Thread-12:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1295, in run
    conn.communicate()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1212, in communicate
    req.simple_response("408 Request Timeout")
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 612, in simple_response
    self.wfile.sendall("".join(buf))
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1126, in sendall
    return self._safe_call(False, super(SSL_fileobject, self).sendall, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1078, in _safe_call
    return call(*args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 748, in sendall
    bytes_sent = self.send(data)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1129, in send
    return self._safe_call(False, super(SSL_fileobject, self).send, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1108, in _safe_call
    raise FatalSSLAlert(*e.args)
FatalSSLAlert: [('SSL routines', 'SSL23_WRITE', 'ssl handshake failure')]

Exception in thread CP WSGIServer Thread-12:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1295, in run
    conn.communicate()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1212, in communicate
    req.simple_response("408 Request Timeout")
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 612, in simple_response
    self.wfile.sendall("".join(buf))
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1126, in sendall
    return self._safe_call(False, super(SSL_fileobject, self).sendall, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1078, in _safe_call
    return call(*args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 748, in sendall
    bytes_sent = self.send(data)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1129, in send
    return self._safe_call(False, super(SSL_fileobject, self).send, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1108, in _safe_call
    raise FatalSSLAlert(*e.args)
FatalSSLAlert: [('SSL routines', 'SSL23_WRITE', 'ssl handshake failure')]
I was originally having some problems with SSL, so I turned that off and just went open access, but the problems persisted.

I see it says something about "cannot assign requested address". In sabnzbd.ini, I have the following options entered:
host =
port = 9089
https_port = 9091

I can't access it from :9091, so I just use :9089 and that's fine. I originally tried making host 0.0.0.0, but that resulted in the crashes. I took a look at the logfile and saw problems with assigning the address, so I blanked out the host to nothing, but now I'm getting segmentation faults and can't even start it up half the time. The times I can start it up, it crashes within a minute.

/etc/default/sabnzbd is as follows:

Code: Select all

# This file is sourced by /etc/init.d/sabnzbdplus
#
# When SABnzbd+ is started using the init script, the
# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.

# [required] user or uid of account to run the program as:
USER=******************

# [optional] full path to the configuration file of your choice;
#            otherwise, the default location (in $USER's home
#            directory) is used:
CONFIG=

# [optional] hostname/ip and port number to listen on:
HOST=
PORT=

# [optional] extra command line options, if any:
EXTRAOPTS=
Note: I am accessing this from a subdomain of mine, home.mydomain.com, might I put that into the host? I don't require 127.0.0.1 access, but I do need remote and/or LAN access.

Thanks!

Adding: running on Ubuntu 11.10, P4 2.8GHz, 2GB memory, basic server

Re: Crashes over and over; segmentation fault? hostname?

Posted: February 7th, 2012, 3:12 am
by shypike
It means that SABnzbd cannot resolve the hostname to an IP address.
Which hostname are you using?

Re: Crashes over and over; segmentation fault? hostname?

Posted: February 14th, 2012, 12:16 am
by RT1000
(editing the file located at /etc/default/sabnzbdplus:)

I've tried
*blanking out the host field
*0.0.0.0
*LAN IP (192.168.XX)
*WAN IP (66.83.XX)
*my subdomain (points to same 66.83.XX).

When I try to start it, 50% of the time it'll start, then crash before I can even load the web interface, and the other 50% it returns:

Code: Select all


$ sudo /etc/init.d/sabnzbdplus start
 * Starting SABnzbd+ binary newsgrabber
Segmentation fault
   ...fail!
I'm guessing it's a bad stick of RAM. I won't be able to replace that for about a month, so I'll check back in here when I can do that, unless you have any other ideas to try.

Also I might add, sabnzbdplus works PERFECTLY on my local PC, I would just rather have on my remote, always connected machine with its quick internet tube.

Thanks!

Re: Crashes over and over; segmentation fault? hostname?

Posted: February 14th, 2012, 5:03 am
by jcfp
RT1000 wrote:I don't know much about python, but I saw elsewhere on the forums that Segmentation Faults are not common.
They aren't indeed, because they happen only in compiled code. Sab itself doesn't have any of that, but does use other libraries that do, most notably cheetah, openssl, and the python executable itself. The only one you could easily eliminate (for testing purposes) is openssl, by removing the python-openssl package from your system. That would kill ssl and https support in sab (at least until that package is reinstalled), but if it stops crashing you'd know where the issue is.

Re: Crashes over and over; segmentation fault? hostname?

Posted: February 14th, 2012, 8:47 am
by sander
jcfp wrote:
RT1000 wrote:I don't know much about python, but I saw elsewhere on the forums that Segmentation Faults are not common.
They aren't indeed, because they happen only in compiled code. Sab itself doesn't have any of that, but does use other libraries that do, most notably cheetah, openssl, and the python executable itself. The only one you could easily eliminate (for testing purposes) is openssl, by removing the python-openssl package from your system. That would kill ssl and https support in sab (at least until that package is reinstalled), but if it stops crashing you'd know where the issue is.
jcfp, are you saying it's probably a bug/error in the compiled code? I would say problematic RAM is a more probable cause; with bad RAM anything can happen, like segmentation faults. I would first run memtest86 to test for bad RAM before anything else.

Re: Crashes over and over; segmentation fault? hostname?

Posted: February 14th, 2012, 9:06 am
by jcfp
Bad hardware sure is a possible cause, except that program startup doesn't exactly use lots of memory. With 2GB available, and sab using <=1% of that, what are the odds of crashing like this all the time as a result of memory failure?