Daemon startup error
Forum rules
Help us help you:
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.
Daemon startup error
I'm currently trying to reinstall sabnzbd 0.7.7 on my readynas through commandline after a reformat and running into a error. I'm having a issue where if i try to start sabnzbd through daemon I get a "Sorry, requires Python 2.5, 2.6 or 2.7" error. Note that I'm using the boilerplate init.d file from http://forums.sabnzbd.org/viewtopic.php?t=2013&start=0 with the correct information fill out. I do have Python 2.7.3 installed and have checked with "python -V". It is also the only version of python installed. sabnzbd does run if I do open it with "python SABnzbd.py".
Thanks
Thanks
Re: Daemon startup error
Just checking: Is readynas using Ubuntu or Debian?
Can you post the exact init.d file you're using (you can wipe out a password used)
Can you post the exact init.d file you're using (you can wipe out a password used)
Re: Daemon startup error
It's a x86 debian etch.
Code: Select all
#! /bin/sh
### BEGIN INIT INFO
# Provides: sabnzbd
# Short-Description: start/stop sabnzbd web interface
### END INIT INFO
USER="root"
HOME="/root/"
SAB_IP="192.168.1.103:2708"
SAB_USER="*my user"
SAB_PASS="*my password"
SAB_APIKEY="4a245ce678d2b80eebd5c03577c1554f"
case "$1" in
start)
echo "Starting SABnzbd."
/usr/bin/sudo -u $USER -H /c/.SABnzbd/SABnzbd.py -d -f $HOME/.sabnzbd/sabnzbd.ini
;;
stop)
echo "Shutting down SABnzbd."
/usr/bin/wget -q --delete-after "http://$SAB_IP/sabnzbd/api?mode=shutdown&ma_username=$SAB_USER&ma_password=$SAB_PASS&apikey=$SAB_APIKEY"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
Re: Daemon startup error
OK. What happens when you execute the command below from the command line:
Code: Select all
/usr/bin/sudo -u root -H /c/.SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
Re: Daemon startup error
I get the "Sorry, requires Python 2.5, 2.6 or 2.7." error.
Re: Daemon startup error
So ... does that ring a bell? If not, run the two commands below and post the output here:zanora wrote:I get the "Sorry, requires Python 2.5, 2.6 or 2.7." error.
Code: Select all
sander@R540:~$ /usr/bin/sudo -u root python --version
Python 2.7.3
sander@R540:~$
sander@R540:~$ /usr/bin/sudo -u root which python
/usr/bin/python
sander@R540:~$
Re: Daemon startup error
Yeah. This is what I get.
Code: Select all
nas-F9-1E-CC:/# /usr/bin/sudo -u root python --version
Python 2.7.3
nas-F9-1E-CC:/# /usr/bin/sudo -u root which python
/usr/local/bin/python
Re: Daemon startup error
Start Python and type in this mini-program:
What is the output?
Code: Select all
import sys
print sys.version_info
Re: Daemon startup error
Aha ... location of python binary ...
What is the output of:
I think "/usr/bin/python", and that would be the root cause. Solution would be to put 'python' in the calling line, possibly something like:
Can you try that from the command line first?
What is the output of:
Code: Select all
head /c/.SABnzbd/SABnzbd.py
Code: Select all
/usr/bin/sudo -u root -H python /c/.SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
Re: Daemon startup error
Code: Select all
nas-F9-1E-CC:/# python
Python 2.7.3 (default, Jan 1 2013, 21:16:51)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.version_info
sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0)
>>>
Code: Select all
nas-F9-1E-CC:/# head /c/.SABnzbd/SABnzbd.py
#!/usr/bin/python -OO
# Copyright 2008-2012 The SABnzbd-Team <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Re: Daemon startup error
OK, and what happens when you run the command I gave you?
/usr/bin/sudo -u root -H python /c/.SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
/usr/bin/sudo -u root -H python /c/.SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
Re: Daemon startup error
Oh cool. That did the trick and sabnzbd is up and running. Thanks sander.
Re: Daemon startup error
OK, cool.zanora wrote:Oh cool. That did the trick and sabnzbd is up and running. Thanks sander.
To fully understand the problem: What is the output of:
Code: Select all
ls -al /usr/bin/python
/usr/bin/python --version
Re: Daemon startup error
Code: Select all
nas-F9-1E-CC:~# ls -al /usr/bin/python
lrwxrwxrwx 1 root root 9 2013-01-01 21:24 /usr/bin/python -> python2.4
nas-F9-1E-CC:~# /usr/bin/python --version
Unknown option: --
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
Re: Daemon startup error
Interesting? Annoying! ;-)
If python 2.4 is not needed anymore, the link could be better to python 2.7.
If python 2.4 is not needed anymore, the link could be better to python 2.7.