opstarten SABnzbd service mislukt / wordt gelijk gekilled

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • burlapp
  • Registratie: Februari 2004
  • Laatst online: 02-11-2024
ik draai een ClearOS server (zie hier), een distro gebaseerd op CentOS 5. Ik heb ik SABnzbd op geinstalleerd, samen met wat hulp van deze howto walk trough.

Alles werkt naar behoren, maar ik krijg de service niet goed gestart. Als ik dmv. Putty inlog in het systeem onder root kan ik de service starten met het volgende commando:

code:
1
usr/local/SABnzbd-0.5.0/SABnzbd.py -b0 -s 0.0.0.0:8080


Alles werkt dan zoals moet, en ik kan de nieuwsgroepen download service netjes via http benaderen. Als ik Putty afsluit / uitlog stopt ook de service. (logisch, wat user root wordt inactief en bijbehorende applicaties stoppen ook). Nu wil ik dat deze dienst start op het moment dat de server start. In de walkthrough is uitgelegd dat de volgende code gebruikt kan worden om te zorgen dat de service netjes start en afsluit bij rebooten:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#chkconfig: 2345 99 10
#description: NZB download service

ARG1=$1
URLPORT="192.168.1.1:8080"   # <-- modify once
SABUSER="......."  #  <-- enter your username
PASSWD="........."  # <-- and password 

#----------
# After upgrading SABnzbd please only modify 2 following lines
DIRPROG="/usr/local/SABnzbd-0.5.0"
APIKEY="......................"  # <-- See ../sabnzbd/config/general
#-----------
DIRUSER=/home/$SABUSER/.sabnzbd   # <-- leave it or modify once

case $ARG1 in

start)
  echo "Starting SABnzbd."
  /usr/bin/sudo -u $SABUSER -H python2.4 $DIRPROG/SABnzbd.py -d -f $DIRUSER/sabnzbd.ini
  echo "Succesfully started SABnzbd on" $URLPORT
   ;;

stop)
  echo "Shutting down SABnzbd."
  /usr/bin/wget -q --delete-after "http://$URLPORT/sabnzbd/api?mode=shutdown&ma_username=$SABUSER&ma_password=$PASSWD&apikey=$APIKEY"
  echo "Succesfully stopped SABnzbd on" $URLPORT
   ;;

*)
  echo "Usage: $0 {start|stop}"
  exit 1

esac

exit 0


Bij het uitvoeren van dit script zegt de service netjes dat alles draait, maar ik kan de service niet van buiten benaderen. Ik denk dat het te maken heeft met user. Maar ook als ik de root user met bijbehorend wachtwoord invoer, werkt het niet... Misschien dat de service wordt opgestart en gelijk weer gekilled? Ik heb te weinig kennis van zaken om dit werkend te krijgen. De apikey heb ik uit de applicatie gevist door hem onder putty uit te voeren. Die is verder goed. Ik ben nu op zoek naar wat ik fout doe of wat ik kan proberen om de boel wel continu aan de praat te krijgen/houden.

Acties:
  • 0 Henk 'm!

  • JohnR
  • Registratie: April 2003
  • Niet online

JohnR

Koffie is lekker!

En root heeft ook echt de sudo rechten? Ik gebruik persoonlijk vaker su -c maar op zich is er niets mis met sudo

/(bb|[^b]{2})/


Acties:
  • 0 Henk 'm!

  • Japius
  • Registratie: April 2003
  • Laatst online: 30-08 20:57
Waarschijnlijk paste je deze code in /etc/init.d/sabnzbdplus. Dat bestand kan je ook even aanroepen door "/etc/init.d/sabnzbdplus start" uit te voeren. Je zou dan moeten zien "Succesfully started SABnzbd on" en je poort. Met een netstat -natp zie je of de dienst ook draait.

Dat ie niet van buitenaf zichtbaar is, is een configuratieoptie in SABNZBD. Dat zul je dan ook daar moeten oplossen.

Acties:
  • 0 Henk 'm!

  • Falco
  • Registratie: Augustus 2008
  • Laatst online: 12:19
Ik ben niet zo thuis in het server gebeuren, maar ik start SABnzbd tegenwoordig dmv de autorun die in SABnzbd zit.
Hier de link naar de uitleg uitleg:
http://www.ainer.org/linu...0-5-0-install-setup-guide

Het stukje over de autorun hieronder.

Auto-run

From the desktop go to the LM Menu and under the System section click on Terminal. In the terminal copy and paste the following:
sudo gedit /etc/default/sabnzbdplus

Now, hit enter and type in your user password if prompted and hit enter once more. This will open up gedit with a configuration file. In this file we need to add some information so the startup script will execute properly.

First find the section that says USER=. Now, immediately after the equal sign (no spaces) type in your exact user name just like so (using “ainer” as an example username):
# [required] user or uid of account to run the program as:
USER=ainer

Now, we need to find the section that says HOST= and PORT=. For the host put in 0.0.0.0 and for the port put in 8888 (if you have other services running that will conflict with this port use something different!). When you’re done it should look like this:
# [optional] hostname/ip and port number to listen on:
HOST=0.0.0.0
PORT=8888

Now, click save at the top of the gedit window and reboot your system.

As your system reboots, take a breath and hope for the best, if everything works out we’ll continue on to configuring the program.

However, if you run into any problems see the Troubleshooting section at the bottom, failing that check the SABnzbd+ wiki and forum (linked in the credits section towards the bottom), failing that respond below (but, again I’m just your average user, no super powers here).

Acties:
  • 0 Henk 'm!

  • burlapp
  • Registratie: Februari 2004
  • Laatst online: 02-11-2024
Japius schreef op woensdag 19 januari 2011 @ 12:03:
Waarschijnlijk paste je deze code in /etc/init.d/sabnzbdplus. Dat bestand kan je ook even aanroepen door "/etc/init.d/sabnzbdplus start" uit te voeren. Je zou dan moeten zien "Succesfully started SABnzbd on" en je poort. Met een netstat -natp zie je of de dienst ook draait.

Dat ie niet van buitenaf zichtbaar is, is een configuratieoptie in SABNZBD. Dat zul je dan ook daar moeten oplossen.
Als ik in putty dat doe krijg ik het volgende
code:
1
2
3
4
[root@**** ~]# /etc/init.d/SABnzbd start
Starting SABnzbd.
Succesfully started SABnzbd on 192.168.1.1:8080
[root@**** ~]#


Echter kan ik hem dan niet aanroepen. Ik krijg dan de melding dat de webpagina niet beschikbaar is ;(

wel zie ik dat een service aan het luisteren is op 8080:

code:
1
tcp        0      0 192.168.1.1:8080            0.0.0.0:*                   LISTEN      6286/python

[ Voor 9% gewijzigd door burlapp op 19-01-2011 13:37 ]


Acties:
  • 0 Henk 'm!

Verwijderd

[b][message=35391487,noline]Alles werkt naar behoren, maar ik krijg de service niet goed gestart. Als ik dmv. Putty inlog in het systeem onder root kan ik de service starten met het volgende commando:

code:
1
usr/local/SABnzbd-0.5.0/SABnzbd.py -b0 -s 0.0.0.0:8080
Ik weet niet of het anders gaat onder ClearOS als onder Ubuntu Server, maar volgens mij moet bovenstaande code ook nog de parameter '-d' bevatten (achter het IP adres).

als goed is blijft het proces draaien als je Putty sluit...
vraag is alleen of je dit proces als root wilt aftrappen...

Acties:
  • 0 Henk 'm!

  • burlapp
  • Registratie: Februari 2004
  • Laatst online: 02-11-2024
dus als dit?
code:
1
/usr/local/SABnzbd-0.5.0/SABnzbd.py -b0 -s 0.0.0.0:8080 -d


Als ik die als service start werkt het :). Is wel niet helemaal de correcte wijze, maar het is goed zo :) .
Het enige is alleen dat webmin niet start (automatisch dan). Deze moet ik handmatig aanzetten...

[ Voor 82% gewijzigd door burlapp op 19-01-2011 15:53 ]


Acties:
  • 0 Henk 'm!

Verwijderd

Hmm, handig, moet ik misschien zelf ook eens aan beginnen. Nu open ik SABnzbd steeds in een screen om 'm draaiend te houden.
Pagina: 1