haugene / docker-transmission-openvpn

Docker container running Transmission torrent client with WebUI over an OpenVPN tunnel
GNU General Public License v3.0
4.1k stars 1.21k forks source link

Transmission can't remove torrents and always performs check on restart #1966

Closed dundunn closed 3 years ago

dundunn commented 3 years ago

Is there a pinned issue for this?

Is there an existing or similar issue/discussion for this?

Is there any comment in the documentation for this?

Is this related to a provider?

Are you using the latest release?

Have you tried using the dev branch latest?

Config used

[Unit]
Description=haugene/transmission-openvpn docker container
After=docker.service
Requires=docker.service

[Service]
User=root
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill transmission-openvpn
ExecStartPre=-/usr/bin/docker rm transmission-openvpn
ExecStartPre=/usr/bin/docker pull haugene/transmission-openvpn
ExecStart=/usr/bin/docker run \
        --name transmission-openvpn \
        --user root:root \
        --cap-add=NET_ADMIN \
        -v /mnt/storage:/data \
        -v /mnt/storage/transmission-openvpn/config:/config \
        -v /mnt/storage/transmission-home/transmission.ovpn:/etc/openvpn/custom/default.ovpn \
        -v /etc/localtime:/etc/localtime:ro \
        -e OPENVPN_PROVIDER=CUSTOM \
        -e LOCAL_NETWORK=192.168.178.0/24 \
        -p 9091:9091 \
        --dns 8.8.8.8 \
        --dns 8.8.4.4 \
        --log-driver json-file \
        --log-opt max-size=10m \
        haugene/transmission-openvpn
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Current Behavior

After I restart the container Transmission has always perform a check on all torrents. Besides that Transmission is unable to remove torrents that I removed via RPC. I had 700 torrents of which I deleted 55 yet the torrents folder remains at 700 torrents. I could remove them manually but finding them can be quite difficult since its names are just hashes.

Expected Behavior

The torrents folder should have as many torrents as the client displays and shouldn't always check every torrent on restart.

How have you tried to solve the problem?

I searched through transmission.log but after the restart the daemon just starts to verify everything without any reasoning. [2021-09-26 16:35:26.978] TORRENT_NAME Queued for verification (verify.c:269)

When I remove torrents this happens in the log.

[2021-09-26 16:35:43.996] TORRENT_NAME Removing torrent (torrent.c:1915)
[2021-09-26 16:35:43.996] TORRENT_NAME Pausing (torrent.c:1856)

I tried changing the permissions to 770 which should give full access to the container over the torrents folder yet the daemon is unable to delete the torrents.

Log output

[2021-09-26 16:35:26.976] Transmission 2.94 (d8e60ee44f) started (session.c:740)
[2021-09-26 16:35:26.977] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:971)
[2021-09-26 16:35:26.977] RPC Server Adding address to whitelist: ::1 (rpc-server.c:971)
[2021-09-26 16:35:26.977] RPC Server Adding address to whitelist: 192.168.178.0/24 (rpc-server.c:971)
[2021-09-26 16:35:26.977] RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:1213)
[2021-09-26 16:35:26.977] Port Forwarding Stopped (port-forwarding.c:180)
[2021-09-26 16:35:26.977] DHT Reusing old id (tr-dht.c:307)
[2021-09-26 16:35:26.977] DHT Bootstrapping from 41 IPv4 nodes (tr-dht.c:156)
[2021-09-26 16:35:26.978] Using settings from "/data/transmission-home" (daemon.c:528)
[2021-09-26 16:35:26.978] Saved "/data/transmission-home/settings.json" (variant.c:1266)
[2021-09-26 16:35:26.978] Watching "/data/watch" for new .torrent files (daemon.c:573)
[2021-09-26 16:35:26.978] TORRENT_NAME1 Queued for verification (verify.c:269)
...
[2021-09-26 16:35:26.978] TORRENT_NAMEN Queued for verification (verify.c:269)
[2021-09-26 16:41:20.014] Saved "/data/transmission-home/resume/TORRENT_NAME1.resume" (variant.c:1266)
...
[2021-09-26 16:41:20.014] Saved "/data/transmission-home/resume/TORRENT_NAMEN.resume" (variant.c:1266)
[2021-09-26 16:35:43.990] TORRENT_TO_BE_REMOVED1 Removing torrent (torrent.c:1915)
[2021-09-26 16:35:43.991] TORRENT_TO_BE_REMOVED1 Pausing (torrent.c:1856)
...
[2021-09-26 16:35:43.990] TORRENT_TO_BE_REMOVEDN Removing torrent (torrent.c:1915)
[2021-09-26 16:35:43.991] TORRENT_TO_BE_REMOVEDN Pausing (torrent.c:1856)

Environment

- OS: Ubuntu 20.04.3 LTS
- Docker: 20.10.8, build 3967b7

Anything else?

No response

pkishino commented 3 years ago

If you are certain it’s not permissions related then your probably better off checking the transmission forums as this looks more like a possible bug with transmission and not this container. I can’t say I’ve seen this or have any problems like this.. Did this only start when upgrading to release 4 of this container? did you try running the previous 3.7 release yet? If you look through the discussions there is a thread on one issue with transmission as we downgraded it for this release.. read that and check. Tentatively marking as not container related for now

jpbaril commented 3 years ago

Same here. Also on 4.0 now. All torrents from 3.7 reappear at every reboot even uf I had deleted them from Transmission UI.

Choff3 commented 3 years ago

This exact same behavior just started happening to me a few days ago and switching back to the 'haugene/transmission-openvpn:3.7.1' image fixed it for me.

pkishino commented 3 years ago

Please see #1937 this is due to the switch in versions.. you need to cleanout the resume folder

bradydjohnson commented 3 years ago

@pkishino, can you be more descriptive here please? How do I clean out the resume folder?

I read #1937, and I chose the first option (to accept 4.0 as it is, clean my torrent list and take the one-time pain). My problem is that it's not a one-time pain. Every time I restart my container, all old torrents are readded, and since I moved the old files, the torrent files start to redownload. I want to permanently remove all old torrent files and start fresh.

jpbaril commented 3 years ago

You must delete them in the filesystem. They are in the "torrents" and "resume" directories in the "transmission-home" directory.

vitalybelousov-kareo commented 2 years ago

You must delete them in the filesystem. They are in the "torrents" and "resume" directories in the "transmission-home" directory.

Is it possible after to import torrents? I have many very unique trackers and don't want to lose them.

Helvio88 commented 2 years ago

Is this still an issue? I'm facing the same problem. Tried to clean out the resume folder but nothing helps.

Running latest - should I switch to 3.7.1?

pkishino commented 2 years ago

@Helvio88 did you stop the container before cleaning the folder? also check the torrents folder.

mhbates commented 2 years ago

@Helvio88 @pkishino I'm going through this now. Deleting just the resume folder doesn't seem to do the trick, at least not fully. Based on other discussions here, it sounds like the .torrent files in the torrents folder will also need to be moved out and then each torrent manually re-added.

dustwolf commented 5 months ago

For Ubuntu users this folder is at ~/.config/transmission/resume.