Transmission Doesn't Resume on Restart

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
TheBigYahi
Posts: 13
Joined: Fri Jan 29, 2010 3:16 pm

Transmission Doesn't Resume on Restart

Post by TheBigYahi »

Starting with the nightlies a few weeks ago (sorry I can't be more specific), transmission-daemon no longer remembers what it was doing before it was restarted. If I manually re-add the torrent files it picks up right where it left off. I'm assuming this means that the resume files are intact and working properly, just that Transmission isn't finding them properly on startup. Anyone else having this problem?
TheBigYahi
Posts: 13
Joined: Fri Jan 29, 2010 3:16 pm

Re: Transmission Doesn't Resume on Restart

Post by TheBigYahi »

I think I found the problem, now whenever a .torrent files is added, it is immediately renamed to "filename.torrent.added" and it appears that the watch directory doesn't automatically add .added files on restart.

I verified this by stopping transmission-daemon, renaming the .added files to .torrent and restarting transmission-daemon. On restart the files are immediately renamed .torrent.added and the torrents restart like they should.

Also, a duplicate .torrent.added file is created with a bunch of hex characters between filename and .torrent.added. What's all this for?
TheBigYahi
Posts: 13
Joined: Fri Jan 29, 2010 3:16 pm

Re: Transmission Doesn't Resume on Restart

Post by TheBigYahi »

Can anyone else confirm this bug on the nightlies? I'd really like to know if it's something unique to my setup.
caic
Posts: 2
Joined: Fri Mar 22, 2019 10:31 am

Re: Transmission Doesn't Resume on Restart

Post by caic »

Hello, I know this is a pretty old topic but I'm having exactly the same problem in my Ubuntu Server 18.04 and my Transmission Daemon.

Any ideas?

Thank you!
caic
Posts: 2
Joined: Fri Mar 22, 2019 10:31 am

Re: Transmission Doesn't Resume on Restart

Post by caic »

Hi again,

I did not manage to find out why this behavior so I made a small fix to workaround it.

First, be sure your Transmission Server is starting with the init script:
/etc/init.d/transmission-daemon
NOT the systemctl script:
/etc/systemd/system/multi-user.target.wants/transmission-daemon.service
Then, edit /etc/init.d/transmission-daemon and change the first line:

Code: Select all

#!/bin/sh -e
For:

Code: Select all

#!/bin/bash
Look for the start_daemon function and add theese code lines between comments:

Code: Select all

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
    ##
    ## START fix for resuming torrents
    ##
    cd $CONFIG_DIR
    ls resume | while read RESU
      do
        ADDED=`ls torrents/"${RESU::-7}".torrent.added`
        if [ "$ADDED" ]; then
                TORRENT="${ADDED::-6}"
                mv "$ADDED" "$TORRENT"
        fi
      done
    ##
    ## END fix for resuming torrents
    ##
}
It is not the ideal solution but it works...
Post Reply