0

I'm wondering whether any of you good people can help me, I'm attempting to set up transmission on a pi running raspbmc. I've got it all set up, everything seems fine but after a reboot it doesn't seem to load up the customised settings.json file. When I SSH in and reload the transmission-daemon service it works fine, but once rebooted attempting to access it from the LAN gives a "cannot access page" error.

Settings.json:

    {
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/media/750Gb/Torrents/Complete",
    "download-limit": 100,
    "download-limit-enabled": 0,
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/media/750GB/Torrents/Incomplete",
    "incomplete-dir-enabled": true,
    "lpd-enabled": false,
    "max-peers-global": 200,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-limit-global": 240,
    "peer-limit-per-torrent": 60,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": false,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{3504b7903448a88d97be15eff59d4b1080281a7dFLIGnnJ3",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "pi",
    "rpc-whitelist": "127.0.0.1,192.168.*.*",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 18,
    "upload-limit": 100,
    "upload-limit-enabled": 0,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true
}

I assume something must be wrong, but I've reinstalled twice now following two different guides and nothing doing, so perhaps I'm missing something obvious. Cheers for the help.

Update: Here is the init.d script for transmission-daemon:

#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          transmission-daemon
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start or stop the transmission-daemon.
### END INIT INFO

NAME=transmission-daemon
DAEMON=/usr/bin/$NAME
USER=debian-transmission
STOP_TIMEOUT=30

export PATH="${PATH:+$PATH:}/sbin"

[ -x $DAEMON ] || exit 0

[ -e /etc/default/$NAME ] && . /etc/default/$NAME

. /lib/lsb/init-functions

start_daemon () {
    if [ $ENABLE_DAEMON != 1 ]; then
        log_progress_msg "(disabled)"
        log_end_msg 255 || true
    else    
        start-stop-daemon --start \
        --chuid $USER \
        $START_STOP_OPTIONS \
        --exec $DAEMON -- $OPTIONS || log_end_msg $?
        log_end_msg 0
    fi
}

case "$1" in
    start)
        log_daemon_msg "Starting bittorrent daemon" "$NAME"
        start_daemon
        ;;
    stop)
        log_daemon_msg "Stopping bittorrent daemon" "$NAME"
        start-stop-daemon --stop --quiet \
            --exec $DAEMON --retry $STOP_TIMEOUT \
            --oknodo || log_end_msg $?
        log_end_msg 0
        ;;
    reload)
        log_daemon_msg "Reloading bittorrent daemon" "$NAME"
        start-stop-daemon --stop --quiet \
            --exec $DAEMON \
            --oknodo --signal 1 || log_end_msg $?
        log_end_msg 0
        ;;
    restart|force-reload)
        log_daemon_msg "Restarting bittorrent daemon" "$NAME"
        start-stop-daemon --stop --quiet \
            --exec $DAEMON --retry $STOP_TIMEOUT \
            --oknodo || log_end_msg $?
        start_daemon
        ;;
    status)
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
        ;;
    *)
        log_action_msg "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}" || true
        exit 2
        ;;
esac

exit 0

3 Answers 3

1

I guess problem is because your transmission daemon tries to start before network is ready.

Try to change its init script to make it start last.

4
  • Thanks for your response. What would I change on there? Commented Dec 1, 2014 at 12:49
  • Maybe you can update your question with init scripts so I can see what is wrong in them?
    – 10robinho
    Commented Dec 1, 2014 at 14:12
  • If you start it from /etc/rc.local and you are using ethernet, it should be okay. If you are using wifi, you might want to incorporate a delay or a test, but make sure that is forked. If this is the problem, really whoever packaged transmission for debian should have thought of it.
    – goldilocks
    Commented Dec 1, 2014 at 14:30
  • I've updated with the script, I run over ethernet so theoretically it should be fine. Could it be an issue with the start user? I can't see why that would mean it works when restarted but not rebooted. Commented Dec 1, 2014 at 14:40
1

I did have to swap

# Required-Start:    remote_fs syslog
# Required-Stop:     remote_fs syslog

with

# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network

to make it work.

finally it boots the web gui.

2
  • Consider turning this answer into a comment.
    – Bex
    Commented Sep 4, 2016 at 11:12
  • 1
    I agree that this does not seem like an independent answer but I am not sure what it is a comment on, because it could apply to the original question or either of the current answers -- but I suspect it is really an elaboration of this one, and might as well stand. For future reference, wova, we're not a discussion forum (post are not statically ordered in time), and you should try and present answers as such if you are posting. E.g., "To elaborate on ___'s suggestion...". Please take the tour.
    – goldilocks
    Commented Sep 4, 2016 at 12:11
0

Many people are facing with the same issue. It's an issue with transmission-daemon itself. I too faced this issue and created a workaround by reloading the transmission-daemon 20 seconds after boot.

If you want the workaround,

Create a file in /etc/init.d using

sudo nano /etc/init.d/transmission-reload

Write/Copy the following code into the file

#!/bin/sh
### BEGIN INIT INFO
# Provides:          transmission-reload
# Required-Start:    remote_fs syslog
# Required-Stop:     remote_fs syslog
# Should-Start:      portmap
# Should-Stop:       portmap
# X-Start-Before:    nis
# X-Stop-After:      nis
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Reloads transmission-daemon
# Description:       Modify sleep according to your preferences
#                    placed in /etc/init.d.
### END INIT INFO
sleep 20
sudo service transmission-daemon reload

Save the file by pressing Ctrl + O and then press Enter Key. Exit nano using Ctrl + X.

Make the file executable using

chmod 755 /etc/init.d/transmission-reload

Now, add the file to rc.d using

sudo update-rc.d /etc/init.d/transmission-reload defaults

Transmission's Web Interface should now load automatically after each boot

2
  • I tried this and I get insserv: Service remote_fs has to be enabled to start service transmission-reload insserv: Service syslog has to be enabled to start service transmission-reload insserv: exiting now! update-rc.d: error: insserv rejected the script header when I run sudo update-rc.d transmission-reload defaults
    – user46034
    Commented Jun 28, 2016 at 4:48
  • Don't use sudo in init scripts. They're run with privileges by default.
    – goldilocks
    Commented Sep 4, 2016 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.