Sabnzbd closing without any errors in the logs

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.
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Sabnzbd closing without any errors in the logs

Post by randyklein »

For the past few months, Sabnzbd has been randomly closing without anything in the logs. I'm running the latest version on ubuntu. I've tried updating to the latest (a few times), and totally uninstalling, deleting all of the config files, and installing. It seems to happen when its working on larger (5 gig?) files. When I check the log after a close, there isnt anything at all there. I'm not sure what to try next to troubleshoot. Anyone have any good ideas? Thanks for the help.
User avatar
sander
Release Testers
Release Testers
Posts: 8867
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd closing without any errors in the logs

Post by sander »

Run SABnzbd from a console (so: sabnzbdplus), and wait until it stops. Then check what's in the console screen.
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

When I try to run it from console (sabnzbdplus) I get the following:

Code: Select all

media@mediaserver:~$ sabnzbdplus                                                
Traceback (most recent call last):                                              
  File "/usr/bin/sabnzbdplus", line 67, in <module>                             
    import sabnzbd                                                              
  File "/usr/share/sabnzbdplus/sabnzbd/__init__.py", line 57, in <module>       
    if platform.system().lower() == 'darwin':                                   
  File "/usr/lib/python2.7/platform.py", line 1306, in system                   
    return uname()[0]                                                           
  File "/usr/lib/python2.7/platform.py", line 1273, in uname                    
    processor = _syscmd_uname('-p','')                                          
  File "/usr/lib/python2.7/platform.py", line 1030, in _syscmd_uname            
    rc = f.close()                                                              
IOError: [Errno 10] No child processes
Thoughts?
User avatar
sander
Release Testers
Release Testers
Posts: 8867
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd closing without any errors in the logs

Post by sander »

What is the output of "free -m"?
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

Wow, you are good. Looks like you might have just solved it... It looks pretty low. I'll work on reducing the memory. Here is the output:

Code: Select all

media@mediaserver:~$ free -m                                                    
             total       used       free     shared    buffers     cached       
Mem:          2004       1878        126          0        211       1172       
-/+ buffers/cache:        494       1509                                        
Swap:         1907         19       1887                                        
media@mediaserver:~$  
User avatar
sander
Release Testers
Release Testers
Posts: 8867
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd closing without any errors in the logs

Post by sander »

randyklein wrote:Wow, you are good. Looks like you might have just solved it... It looks pretty low. I'll work on reducing the memory. Here is the output:
Yeah, I am. ;-) But not in this case: You have 2GB RAM (which is good), and you have swap (which is good too, and it is not much used), so that is NOT the cause of your error. I was just checking you were not running SABnzbd on a low-RAM system.
And read http://www.linuxatemyram.com/ to see that Linux will eat all the RAM it can. So no problem there.

Can you run this:

Code: Select all

python

import platform
platform.system()
and post the output here?
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

ok, that makes sense. Webmin is showing that I have plenty of free memory. Below are the results. Thanks for all the help!

Code: Select all

media@mediaserver:~$ python                                                     
Python 2.7.2+ (default, Oct  4 2011, 20:03:08)                                  
[GCC 4.6.1] on linux2                                                           
Type "help", "copyright", "credits" or "license" for more information.          
>>> import platform                                                             
>>> platform.system()                                                           
Traceback (most recent call last):                                              
  File "<stdin>", line 1, in <module>                                           
  File "/usr/lib/python2.7/platform.py", line 1306, in system                   
    return uname()[0]                                                           
  File "/usr/lib/python2.7/platform.py", line 1273, in uname                    
    processor = _syscmd_uname('-p','')                                          
  File "/usr/lib/python2.7/platform.py", line 1030, in _syscmd_uname            
    rc = f.close()                                                              
IOError: [Errno 10] No child processes 
User avatar
sander
Release Testers
Release Testers
Posts: 8867
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd closing without any errors in the logs

Post by sander »

OK, that's the cause of your problem: a problem with your system or python setup. See below for the expected behaviour.

So: not a SABnzbd problem. You could type 'uname -a' on the command prompt to further investigate it.

So:

Code: Select all

uname
uname -a
uname -p
uname -s

Code: Select all

sander@R540:~$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.system()
'Linux'
>>> 
sander@R540:~$
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

Ok, I got "sabnzbdplus" to work at the terminal by just commenting out that line in the _init_.py file. Its fine since i'm using linux not win.

So, now back to my original issue. When I run "sabnzbdplus" at the command prompt it runs, then completes the command. I dont see any logging info / running info. Here is what the output looks like:

Code: Select all

media@mediaserver:~$ sabnzbdplus                                                
media@mediaserver:~$    
Am I doing something wrong?
User avatar
sander
Release Testers
Release Testers
Posts: 8867
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd closing without any errors in the logs

Post by sander »

Why don't you solve the system problem? That's the root cause. I don't know which line you commented out, and what the effect is.

If you run "sabnzbdplus" and it's already running (and it is set to start a webbrowser), it would say:

Code: Select all

sander@R540:~$ sabnzbdplus 
sander@R540:~$ Created new window in existing browser session.

sander@R540:~$ 
You don't get that message, so that makes me a bit suspicious (but maybe browser-auto-start is set to off?). Anyway: check if sabnzbd is running:

Code: Select all

sander@R540:~$ ps -ef | grep -i sabnzbd
sander   11387  5138  4 17:59 pts/2    00:00:09 /usr/bin/python -OO /usr/bin/sabnzbdplus
sander   11686  6727  0 18:03 pts/3    00:00:00 grep --color=auto -i sabnzbd
sander@R540:~$
HTH
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

well, i'm running it in a non-gui environment, so I dont think it can open a browser. Even so, in your screen shot it is completing the process once it opens, so you still wouldn't see any log if the process errored out. Right? Am I missing something?

After I type "sabnzbd" at terminal I am able to connect and use it.
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

also, below is the code I commented out. It's all in the one clause. Apparently, Darwin = Mac. I'm running on linux, so I should be safe.

Code: Select all

#    if platform.system().lower() == 'darwin':
#        DARWIN = True
#        try:
#            import Foundation
#            FOUNDATION = True
#        except:
#            pass
#        if platform.machine() == 'i386':
#            DARWIN_INTEL = True
User avatar
sander
Release Testers
Release Testers
Posts: 8867
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd closing without any errors in the logs

Post by sander »

Apparantly you're already running SABnzbd as 1) you can access it and 2) running sabnzbdplus does not show anything. Did you start it as a daemon? If so, you indeed can't see stderr / stdout logging.

FWIW: in __init__.py there's another platform.-call: platform.mac_ver()

I still find it a pity that you don't solve the root cause, and that you don't show the output of the uname commands ... This way your problem comes back at the moment you use another SABnzbd version ...
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

Sorry, I didn't address all of your original questions / points. Honestly, I dont know if I'm good enough to fix the underlying issue. The init.py was executing fine, so I figured I fixed the issue. But you're right about the upgrade.

It looks like you were right on the running part. I have it started now, i'm going to try to get it to error and report back.

Here is the result of uname -a:

Code: Select all

media@mediaserver:~$ uname -a                                                   
Linux mediaserver 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 17:34:21 UTC 2012 i6
86 i686 i386 GNU/Linux                                                          
media@mediaserver:~$    
Thanks again for the help! I really appreciate it.
randyklein
Newbie
Newbie
Posts: 10
Joined: December 26th, 2012, 6:00 pm

Re: Sabnzbd closing without any errors in the logs

Post by randyklein »

so a quick update. That helped find the issue. It was a "segmentation error" which apparently is something outside of SABnzbd. I'm just going to go ahead and rebuild the machine to clean everything up. Thanks for the help Sander!
Post Reply