SABnzbd und locale Problem (User: sabnzbd)

  • Hallo zusammen,


    wenn SABnzbd automatisch beim Neustart startet, wird automatisch mit dem User sabnzbd gestartet. Jedoch ist bei diesem User die locales-Umgebung nicht/falsch gesetzt, sodaß ich beim automatischen entpacken bei Umlaut-Dateien immer wieder Fehler bei den Dateinamen habe.
    Stoppe ich SABnzbd über /etc/init.d sabnzbd stop und starte über start wieder (als root), werden die Dateien korrekt entpackt.


    Wie bringe dem User sabnzbd die deutsche locale (de_DE.UTF-8) bei? Oder kann ich SABnzbd beibringen, immer mit dieser Einstellung zu laden?


    Im SABnzbd Forum habe ich gelesen, daß man einige Zeilen in die /etc/default/sabnzbdplus schreiben soll und es dann funktioniert. Leider gibt es bei OMV diese Datei nicht.


    Hoffe Ihr könnt mir dabei helfen, oder hatte noch niemand das Problem?


    Danke & Gruß
    Daniel

  • sodaß ich beim automatischen entpacken bei Umlaut-Dateien immer wieder Fehler bei den Dateinamen habe.


    Konnte ich noch nicht feststellen und auch nen Freund von mir hat davon noch nicht berichtet...


    Leider gibt es bei OMV diese Datei nicht.


    Dann leg sie an ;)


    Hoffe Ihr könnt mir dabei helfen, oder hatte noch niemand das Problem?


    Helfen tun wir gern. Aber soweit ich das beurteilen kann hatte dieses Problem noch keiner...


    Gruß
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • OK, anlegen der Datei mit dem Inhalt hat leider nicht funktioniert.
    Lade mir gerade die ISO runter und versuche es damit. Habe auf einem Debian 7 Linux OMV per Package Installation am Laufen.
    Mal schauen ob es dabei Probleme gibt. Werde dann nocheinmal berichten.


    Danke erst einmal.

  • Sorry it is hard to understand via google translate, I see that if you run as root you have no problems, so to me it looks like a permissions issue. If it does give an error, can you post that here.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Hallo,


    habe jetzt erstmal eine neue VM mit dem ISO-Image erstellt. Es tritt bei mir weiterhin der Fehler auf.
    Angehängt mal zwei Beispiele. Wenn ich mich als root einlogge und manuell unrar ausführe werden die Umlaute korrekt entpackt.
    Ich habe dann mal in die Startdatei unter /etc/init.d/ bei RunAs den User root angegeben, jedoch tritt auch hier der Fehler mit dem Umlauten auf.
    Meine OMV Instanzen laufen alle in einer VM unter Proxmox. Festplatten sind alle hardwaremässig nur auf der jeweiligen VM über virtio eingebunden.


    @jhmiller: I have no errors with sabnzbd in that case. I only have problems with automatic unrar of downloaded items, as you can see in the attachements. If i ssh as root to OMV and manually unrar the downloaded file it is all correct with german ä, ö, ü, etc. I have manually installed rar and unrar 5.11 from rarlab.com.

  • My location is set to UK and I have a few items with accented letters all of which extracted ok


    Is the drive you are extracting to part of a samba share?


    This maybe of use
    http://forums.sabnzbd.org/viewtopic.php?t=10595


    Hi jhmiller,


    yes, the drive is a part of a samba share. If I ssh as root and stop SABnzbd over /etc/init.d/sabnzbd stop and start /etc/init.d/sabnzbd start it's all OK. If I reboot my server and start SABnzbd automatically, i have problems with Ä, Ö, Ü, etc.


    Thx

  • In the SMB/CIFS "Extra Options" try adding

    Code
    display charset = UTF-8
    unix charset = UTF-8


    I am afraid that If that does not work I have no idea how to solve this.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Hi,


    have the same problem. As I am a Lunix Noob I don't know how to find the init script.


    In /etc/default I haven't a sabnzbd file. In home/sabnzbd I have an init file but it contains only the settings.


    In wich file I have to add this code?

  • /etc/init.d/sabnzbd


    @jhmiller how about updating the file in the plugin?


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • That section has been in the init file since version 1.0.6 (latest version is 1.0.7) committed on Feb 26 2015


    Looks like that section does not solve the issue??

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Have had a look into the sabnzbd file at init.d but I couldn't find the Lines which should be added. Therefore I added manually and now it is fine. Below you could find the untouched init file:


    #!/bin/bash
    #
    ### BEGIN INIT INFO
    # Provides: sabnzbdplus
    # Required-Start: $local_fs $network $remote_fs
    # Required-Stop: $local_fs $network $remote_fs
    # Should-Start: NetworkManager
    # Should-Stop: NetworkManager
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: SABnzbd+ binary newsgrabber
    ### END INIT INFO


    ############### EDIT ME ##################
    # Path to store PID file
    PID_FILE=/var/run/sabnzbd/sabnzbd.pid
    PID_PATH=/var/run/sabnzbd


    # script name
    NAME=sabnzbd
    DESC=SABnzbd
    # startup args
    DAEMON_OPTS="--daemon --pidfile $PID_FILE"
    EXTRA_OPTS=""
    RUN_AS=sabnzbd
    DAEMON=SABnzbd.py
    APP_PATH=/opt/SABnzbd
    CONFIG="/home/sabnzbd/.sabnzbd/sabnzbd.ini"
    HOST="0.0.0.0"


    if [ -f $CONFIG ]; then
    #HOST=`grep -m 1 ^host $CONFIG | cut -d ' ' -f 3` Not needed ?
    if [ `grep -m 1 ^enable_https $CONFIG | cut -d ' ' -f 3` == "1" ]; then
    PORT=`grep ^https_port $CONFIG | cut -d ' ' -f 3`
    else
    PORT=`grep -m 1 ^port $CONFIG | cut -d ' ' -f 3`
    fi
    else
    PORT="8080"
    fi
    ############### END EDIT ME ##################


    test -x $APP_PATH/$DAEMON || exit 0


    # Load the VERBOSE setting and other rcS variables
    . /lib/init/vars.sh


    # Define LSB log_* functions.
    # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
    . /lib/lsb/init-functions


    set -e


    if [ ! -d $PID_PATH ]; then
    mkdir -p $PID_PATH
    chown -R $RUN_AS:users $PID_PATH
    fi


    if [ ! -d /home/sabnzbd/.sabnzbd ]; then
    mkdir -p /home/sabnzbd/.sabnzbd
    chown -R $RUN_AS:users /home/sabnzbd/.sabnzbd
    fi


    if [ -e $PID_FILE ]; then
    PID=`cat $PID_FILE`
    if ! kill -0 $PID > /dev/null 2>&1; then
    echo "Removing stale $PID_FILE"
    rm $PID_FILE
    fi
    fi


    load_settings()
    {
    HOST="0.0.0.0"
    #Set SABnzbd address here.
    EXTRAOPTS=""
    OPTIONS="$DAEMON_OPTS"
    OPTIONS="$OPTIONS --config-file $CONFIG $EXTRA_OPTS"
    SERVER="$HOST"
    SERVER="$SERVER:$PORT"
    OPTIONS="$OPTIONS --server $SERVER"
    OPTIONS="$OPTIONS $EXTRAOPTS"
    }


    is_running()
    {
    if [ ! -e $PID_FILE ]; then
    return 1
    fi
    return 0
    }


    case "$1" in
    start)
    echo "Starting $DESC"
    load_settings;
    cd $APP_PATH
    start-stop-daemon -d $APP_PATH -c $RUN_AS --start --exec $DAEMON -- $OPTIONS
    ;;


    stop)
    if is_running; then
    echo "Stopping $DESC"
    start-stop-daemon --stop --pidfile $PID_FILE --retry 15
    fi
    ;;


    restart|force-reload)
    if is_running; then
    start-stop-daemon --stop --pidfile $PID_FILE --retry 15
    fi
    echo "Restarting $DESC"
    load_settings;
    cd $APP_PATH
    start-stop-daemon -d $APP_PATH -c $RUN_AS --start --exec $DAEMON -- $OPTIONS
    ;;


    status)
    status_of_proc -p $PID_FILE "$DAEMON" "$NAME"
    ;;


    *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart|status|force-reload}" >&2
    exit 1
    ;;
    esac


    exit 0


    I Have added the lines here:


    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: SABnzbd+ binary newsgrabber
    ### END INIT INFO


    ############### EDIT ME ##################
    # Path to store PID file
    PID_FILE=/var/run/sabnzbd/sabnzbd.pid
    PID_PATH=/var/run/sabnzbd


    # script name
    NAME=sabnzbd
    DESC=SABnzbd
    # startup args
    DAEMON_OPTS="--daemon --pidfile $PID_FILE"
    EXTRA_OPTS=""
    RUN_AS=sabnzbd
    DAEMON=SABnzbd.py
    APP_PATH=/opt/SABnzbd
    CONFIG="/home/sabnzbd/.sabnzbd/sabnzbd.ini"
    HOST="0.0.0.0"


    [ -r /etc/default/locale ] && {
    . /etc/default/locale;
    [ -n "$LANG" ] && export LANG;
    }


    if [ -f $CONFIG ]; then
    #HOST=`grep -m 1 ^host $CONFIG | cut -d ' ' -f 3` Not needed ?
    if [ `grep -m 1 ^enable_https $CONFIG | cut -d ' ' -f 3` == "1" ]; then
    PORT=`grep ^https_port $CONFIG | cut -d ' ' -f 3`
    else
    PORT=`grep -m 1 ^port $CONFIG | cut -d ' ' -f 3`
    fi
    else
    PORT="8080"
    fi
    ############### END EDIT ME ##################


    test -x $APP_PATH/$DAEMON || exit 0


    # Load the VERBOSE setting and other rcS variables
    . /lib/init/vars.sh


    # Define LSB log_* functions.
    # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
    . /lib/lsb/init-functions

  • Hello together,


    I have a very similar Problem but the solution described here does not help in my case.
    My machine runs on OMV 2.2.1 and I use openmediavault-sabnzbd 1.0.5 installed from omv-extras.org.
    The rest of the system is pretty standard. Some SMB Shares and thats all.


    OMVs system language was set to german during installation and I didn't change anything after that.
    When downloading NZBs with german umlauts like ä,ö,ü in the resulting filenames, sabnzbd fails to unrar these files.
    ("Entpacken fehlgeschlagen. Eine erwartete Datei wurde nicht entpackt.")


    Stopping and starting sabnzbd via ssh doesnt fix this behavior and I already inserted


    Code
    [ -r /etc/default/locale ] && {
     . /etc/default/locale;
     [ -n "$LANG" ] && export LANG;
     }


    but even this doesnt help.


    Downloading the affected files from the incomplete-folder via ssh and unrar them on my Ubuntu 14.04 Workstation works flawlessly.


    Can you help me sorting this issue out? This momentary behaviour of sabnzbd is not very family friendly.


    - Smile -

  • correction:


    I tried to unrar these files on my old ubuntu 12.04 machine and it worked.


    sabnzbd seems to replace the umlauts from the filenames in the nzb with some strange inverted <?> characters, when it creates its temp files and unrar on my omv machine doesnt like this replacement characters. What can I do to fix this?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!