crazy-max / docker-rtorrent-rutorrent

rTorrent and ruTorrent Docker image
MIT License
503 stars 112 forks source link

Restarting container with active downloads drops "Added" date for them #375

Open t4rl opened 4 months ago

t4rl commented 4 months ago

Support guidelines

I've found a bug and checked that ...

Description

If you have any non-completed torrents, container restart will result in empty "added" field.

I am not sure where exactly problem lies and I have never used rutorrent/rtorrent standalone and so I have no idea where even to begin. Because I am using the docker image, I decided to start issue here, seeing as how stickz is also very active here.

Screenshots before and after restart ![image](https://github.com/user-attachments/assets/140085ba-02c5-49f0-b74c-cd3285d37e93) ![image](https://github.com/user-attachments/assets/f9aa66d8-0cef-4f85-83de-f38ebde81b52)

Expected behaviour

Added date stays the same.

Actual behaviour

Added date is gone.

Steps to reproduce

  1. Add a torrent such as Ubuntu ISO.
  2. Verify it is showing up in a web UI.
  3. Do docker compose down && docker compose up -d.
  4. Refresh web UI.
  5. Notice that "Added" field is empty for the added torrent.

Docker info

Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 14
  Running: 11
  Paused: 0
  Stopped: 3
 Images: 64
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dd1e886e55dd695541fdcd67420c2888645a495
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.0-41-generic
 Operating System: Ubuntu 22.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.46GiB
 Name: octopus
 ID: d056d3d9-e0f9-4938-9230-a5ea4d5d54c4
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
  https://mirror.gcr.io/
 Live Restore Enabled: false

Docker Compose config

No response

Logs

1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: added tracker (group:0 url:https://torrent.ubuntu.com/announce)
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: added tracker (group:1 url:https://ipv6.torrent.ubuntu.com/announce)
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: added tracker (group:2 url:dht://)
1720937059 I Upload unchoked slots adjust; currently:3 adjust:0
1720937059 I Upload unchoked slots adjust; currently:3 adjust:0
1720937059 I Download unchoked slots adjust; currently:0 adjust:0
1720937059 I Download unchoked slots adjust; currently:0 adjust:0
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Closing download directly.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Inserting download.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Closing download directly.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Resuming download: flags:0.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Pausing download: flags:0.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Resuming download: flags:0.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Opening download.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download: Opening torrent: flags:0.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->file_list: Opening.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->chunk_list: Resizing: from:0 to:23326.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download: Checking hash: allocated:0 try_quick:1.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->hash_torrent: Start: position:0 size:23326 try_quick:1.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->hash_torrent: Completed (normal): position:23326 try_quick:1.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->hash_torrent: Confirm checked.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Hash done.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Resuming download: flags:0.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download: Starting torrent: flags:0.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->file_list: Opening.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_controller: Called enable with 3 trackers.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download: Setting new baseline on start: uploaded:0 completed:0.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_controller: Sending started event.
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: sending 'started (group:0 url:https://torrent.ubuntu.com/announce)
1720937059 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: received 1 peers (url:https://torrent.ubuntu.com/announce)
1720937059 I handshake_manager->185.125.190.59: Adding outcoming connection: encryption:13 message:3.
1720937059 I handshake_manager->185.125.190.59: Handshake success.
1720937059 I Download unchoked slots adjust; currently:0 adjust:1
1720937059 I Download unchoked slots adjust; currently:1 adjust:-1
1720937089 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: sending 'scrape' (group:1 url:https://ipv6.torrent.ubuntu.com/announce)
1720937089 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker: [1] Tracker scrape for 1 torrents: complete:425 incomplete:14 downloaded:0.
1720937089 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: received scrape from tracker (url:https://ipv6.torrent.ubuntu.com/announce)
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Closing download quickly.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Closing download with throw.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Pausing download: flags:0.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download: Stopping torrent: flags:0.
1720937122 I Download unchoked slots adjust; currently:1 adjust:-1
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_controller: Sending stopped event.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_list: sending 'stopped (group:0 url:https://torrent.ubuntu.com/announce)
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->tracker_controller: Called disable with 3 trackers.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download: Closing torrent: flags:0.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->hash_torrent: Clear.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->file_list: Closing.
1720937122 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->chunk_list: Clearing.
1720937129 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Closing download with throw.
1720937129 I 2AA4F5A7E209E54B32803D43670971C4C8CAAA05->download_list: Pausing download: flags:0.
1720937129 N rtorrent disk: Shutting down thread.

Additional info

No response

Ben-Atherton commented 2 months ago

I'm having the same issue

boomboxnation commented 1 month ago

This may have to do with time between RT_SESSION_SAVE_SECONDS? I put in a request (I can't remember where or find it, maybe I was dreaming) to be able to manually force a session save (or do any of you have any idea how?). Basically my thinking is that if you restart having added torrents after the last session save...that of course it will start back up with the last saved session info?