Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all session files are loaded. #332

Open
3 tasks done
AntAreS24 opened this issue Apr 27, 2024 · 15 comments
Open
3 tasks done

Not all session files are loaded. #332

AntAreS24 opened this issue Apr 27, 2024 · 15 comments

Comments

@AntAreS24
Copy link

Support guidelines

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

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

I'm porting from a bare metal rtorrent to this docker image. The first time I loaded the image using docker compose, no file is loaded from the previous instance (on purpose). I then shutdown docker image, copy the session files over (~950 torrents) and restart the image. I can see all 950 torrent in rutorrent.

If I need to stop and restart the instance, only ~1/2 are now loaded (510 instead of 950). This halfing continues until it reaches 30 torrent only. The torrent loaded as not necessarily the same as the previous 1/2. It seems it's loading the session files randomly.

All session files are still present in the file system, so I know nothing has been deleted.

I tried to add the stop_grace_period: 120s in the compose.yml file., but same result.

I'm guessing it has to do with the loading/shutdown time, but I'm not sure which parameter to change.

Expected behaviour

All torrents/session to be loaded every time on restart.

Actual behaviour

Only 1/2 torrents/session loaded.

Steps to reproduce

  1. Start docker compose with no prior data.
  2. Stop docker compose
  3. Copy over session files (*.torrent *.torrent.rtorrent, *.torrent.libtorrent_resume)
  4. Start docker compose again
  5. Stop docker compose
  6. Start docker compose again

Docker info

Client:
 Version:    24.0.5
 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.20.3
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 3
  Running: 3
  Paused: 0
  Stopped: 0
 Images: 5
 Server Version: 24.0.5
 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: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version:
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.0-105-generic
 Operating System: Ubuntu Core 22
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.37GiB
 Name: homeserver
 ID: 49a8d0fc-8cb2-4e84-9828-b9078386d576
 Docker Root Dir: /var/snap/docker/common/var-lib-docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker Compose config

name: rtorrent-rutorrent
services:
  rtorrent-logs:
    command:
    - bash
    - -c
    - tail -f /log/*.log
    container_name: rtorrent-rutorrent-logs
    depends_on:
      rtorrent-rutorrent:
        condition: service_started
        required: true
    image: bash
    network_mode: none
    restart: always
    volumes:
    - type: bind
      source: /media/nas/rtorrent/log
      target: /log
      bind:
        create_host_path: true
  rtorrent-rutorrent:
    container_name: rtorrent-rutorrent
    environment:
      AUTH_DELAY: 0s
      LOG_ACCESS: "true"
      LOG_IP_VAR: remote_addr
      MAX_FILE_UPLOADS: "50"
      MEMORY_LIMIT: 1024M
      OPCACHE_MEM_SIZE: "128"
      PGID: "1000"
      PUID: "1000"
      REAL_IP_FROM: 0.0.0.0/32
      REAL_IP_HEADER: X-Forwarded-For
      RT_DHT_PORT: "6881"
      RT_INC_PORT: "50000"
      RT_LOG_EXECUTE: "false"
      RT_LOG_LEVEL: info
      RT_LOG_XMLRPC: "false"
      RT_SESSION_SAVE_SECONDS: "2400"
      RU_DO_DIAGNOSTIC: "true"
      RU_FORBID_USER_SETTINGS: "false"
      RU_HTTP_TIME_OUT: "30"
      RU_HTTP_USE_GZIP: "true"
      RU_HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101
        Firefox/12.0
      RU_LOCALE: UTF8
      RU_LOG_FILE: /data/rutorrent/rutorrent.log
      RU_LOG_RPC_CALLS: "false"
      RU_LOG_RPC_FAULTS: "true"
      RU_OVERWRITE_UPLOADED_TORRENTS: "false"
      RU_PHP_GZIP_LEVEL: "2"
      RU_PHP_USE_GZIP: "false"
      RU_REMOVE_CORE_PLUGINS: httprpc
      RU_RPC_TIME_OUT: "5"
      RU_SAVE_UPLOADED_TORRENTS: "true"
      RU_SCHEDULE_RAND: "10"
      RUTORRENT_AUTHBASIC_STRING: ruTorrent restricted access
      RUTORRENT_PORT: "8080"
      TZ: Australia/Sydney
      UPLOAD_MAX_SIZE: 16M
      WAN_IP_CMD: "false"
      WEBDAV_AUTHBASIC_STRING: WebDAV restricted access
      WEBDAV_PORT: "9000"
      XMLRPC_AUTHBASIC_STRING: rTorrent XMLRPC restricted access
      XMLRPC_PORT: "8000"
    expose:
    - 6881/udp
    - "8000"
    - "8080"
    - "9000"
    - "50000"
    image: crazymax/rtorrent-rutorrent:latest
    networks:
      rtorrent-rutorrent: null
    ports:
    - target: 6881
      published: "6881"
      protocol: udp
    - target: 8080
      published: "8080"
      protocol: tcp
    - target: 9000
      published: "9000"
      protocol: tcp
    - target: 50000
      published: "50000"
      protocol: tcp
    restart: always
    stop_grace_period: 2m0s
    ulimits:
      nofile:
        soft: 32000
        hard: 40000
      nproc: 65535
    volumes:
    - type: bind
      source: /media/nas
      target: /data
      bind:
        create_host_path: true
    - type: bind
      source: /media/nas/download
      target: /downloads
      bind:
        create_host_path: true
    - type: bind
      source: /media/nas/passwd
      target: /passwd
      bind:
        create_host_path: true
    - type: volume
      source: movies
      target: /media/Movies
      volume: {}
    - type: volume
      source: tv
      target: /media/Series
      volume: {}
networks:
  rtorrent-rutorrent:
    name: rtorrent-rutorrent
volumes:
  movies:
    name: rtorrent-rutorrent_movies
    driver_opts:
      device: //192.168.0.10/Movies
      o: vers=3.0,_netdev,file_mode=0777,dir_mode=0777,
      type: cifs
  tv:
    name: rtorrent-rutorrent_tv
    driver_opts:
      device: //192.168.0.10/Series
      o: vers=3.0,_netdev,file_mode=0777,dir_mode=0777,
      type: cifs

Logs

rtorrent-rutorrent-logs  | 1713932318 N rtorrent main: Starting thread.
rtorrent-rutorrent-logs  | 1713932318 N rtorrent scgi: Starting thread.
rtorrent-rutorrent-logs  | 1713932396 E 8F2E0E89A561553A0F782D32C7D792F79055D5EE->file_list: Failed to prepare file list: Could not create directory '/media/nas/download': No such file or directory
rtorrent-rutorrent-logs  | 1713932396 E Could not resume download: Could not create directory '/media/nas/download': No such file or directory
rtorrent-rutorrent-logs  | 1714193248 N rtorrent scgi: Shutting down thread.
rtorrent-rutorrent-logs  | 1714193297 N rtorrent main: Shutting down thread.
rtorrent-rutorrent-logs  | 1714193297 N rtorrent disk: Shutting down thread.
rtorrent-rutorrent-logs  | 1714193399 N rtorrent main: Starting thread.
rtorrent-rutorrent-logs  | 1714193399 N rtorrent scgi: Starting thread.
rtorrent-rutorrent       | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
rtorrent-rutorrent       | [s6-init] ensuring user provided files have correct perms...exited 0.
rtorrent-rutorrent       | [fix-attrs.d] applying ownership & permissions fixes...
rtorrent-rutorrent       | [fix-attrs.d] done.
rtorrent-rutorrent       | [cont-init.d] executing container initialization scripts...
rtorrent-rutorrent       | [cont-init.d] 00-fix-logs.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 00-fix-logs.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 01-fix-uidgid.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 01-fix-uidgid.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 02-fix-perms.sh: executing...
rtorrent-rutorrent       | Fixing perms...
rtorrent-rutorrent       | [cont-init.d] 02-fix-perms.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 03-config.sh: executing...
rtorrent-rutorrent       | Setting timezone to Australia/Sydney...
rtorrent-rutorrent       | Setting PHP-FPM configuration...
rtorrent-rutorrent       | Setting PHP INI configuration...
rtorrent-rutorrent       | Setting OpCache configuration...
rtorrent-rutorrent       | Setting Nginx configuration...
rtorrent-rutorrent       | Setting Nginx XMLRPC over SCGI configuration...
rtorrent-rutorrent       | Setting Nginx ruTorrent configuration...
rtorrent-rutorrent       | Setting Nginx WebDAV configuration...
rtorrent-rutorrent       | Update healthcheck script...
rtorrent-rutorrent       | Initializing files and folders...
rtorrent-rutorrent       | rpc.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | rutorrent.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | webdav.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | Checking rTorrent local configuration...
rtorrent-rutorrent       | Checking rTorrent configuration...
rtorrent-rutorrent       | Bootstrapping ruTorrent configuration...
rtorrent-rutorrent       | Removing core plugin httprpc...
rtorrent-rutorrent       | Setting custom config for create plugin...
rtorrent-rutorrent       | Checking ruTorrent custom plugins...
rtorrent-rutorrent       | Checking ruTorrent plugins configuration...
rtorrent-rutorrent       | Checking ruTorrent custom themes...
rtorrent-rutorrent       | Setting GeoIP2 databases for geoip2 plugin...
rtorrent-rutorrent       | Fixing perms...
rtorrent-rutorrent       | [cont-init.d] 03-config.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 04-create-services.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 04-create-services.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] ~-socklog: executing...
rtorrent-rutorrent       | [cont-init.d] ~-socklog: exited 0.
rtorrent-rutorrent       | [cont-init.d] done.
rtorrent-rutorrent       | [services.d] starting services
rtorrent-rutorrent       | [services.d] done.
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: using the "epoll" event method
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: nginx/1.24.0
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: OS: Linux 5.15.0-105-generic
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: getrlimit(RLIMIT_NOFILE): 32000:40000
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: start worker processes
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: start worker process 541
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: start worker process 542
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: start worker process 543
rtorrent-rutorrent       | 2024/04/27 14:49:59 [notice] 508#508: start worker process 545
rtorrent-rutorrent       | [27-Apr-2024 14:49:59] NOTICE: fpm is running, pid 511
rtorrent-rutorrent       | [27-Apr-2024 14:49:59] NOTICE: ready to handle connections
rtorrent-rutorrent       | 192.168.2.196 - - [27/Apr/2024:14:50:05 +1000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
rtorrent-rutorrent       | 192.168.2.196 - - [27/Apr/2024:14:50:06 +1000] "GET /php/getsettings.php?_=1714193405813 HTTP/1.1" 200 4866 "http://192.168.0.3:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"

Additional info

No response

@stickz
Copy link
Contributor

stickz commented Apr 27, 2024

You need to remove RU_REMOVE_CORE_PLUGINS: httprpc for ruTorrent v4.3 compatibility. Delete the rpc plugin if it's left over.
https://github.com/Novik/ruTorrent/releases/tag/v4.3.0

@stickz
Copy link
Contributor

stickz commented Apr 27, 2024

Also, it looks like you triggered an internal rtorrent error. When loading session files, it found /media/nas/download not accessible. Session files are not designed to be copied like this.

rtorrent-rutorrent-logs | 1713932396 E 8F2E0E89A561553A0F782D32C7D792F79055D5EE->file_list: Failed to prepare file list: Could not create directory '/media/nas/download': No such file or directory

@AntAreS24
Copy link
Author

Thank you for the quick feedback. I'll try to remove the plug.

And for the migration, what is a better way of doing this? Simply import all torrents in a stop states and "save to.." without moving data?

@stickz
Copy link
Contributor

stickz commented Apr 27, 2024

Copy the data to the default download directory. Add the .torrent files to your watch folder. Let the hash checks complete. Then use "save to" to copy or move the data. All the labels will be lost. You'll have to recreate them. This will rebuild all session files.

@AntAreS24
Copy link
Author

AntAreS24 commented Apr 28, 2024

Thank you for your help. I've done some testing and there's some progress:

  1. rtorrent-rutorrent-logs | 1713932396 E 8F2E0E89A561553A0F782D32C7D792F79055D5EE->file_list: Failed to prepare file list: Could not create directory '/media/nas/download': No such file or directory Only happened once. I guess I moved the underlying file, but did not repoint the torrent to the new location. I don't have this error anymore.
  2. I removed httprpc from the rtorrent-rutorrent.env, but I can still see the line in the start-up logs. I tried to rebuild the image (thinking it was only once during the image building), but to no avail. The current config is like this: RU_REMOVE_CORE_PLUGINS=
  3. If I copy 1 torrent file in the watch folder, it works and I can see it loading up in the UI. If I copy a batch, nothing happens. No error in the logs.

-- UPDATE--
By doing the pull, I noticed you published a new image yesterday... I need to update my config :-P Be right back.

-- UPDATE 2 --
https://github.com/crazy-max/docker-rtorrent-rutorrent/releases/tag/4.3.0-0.9.8_2-0.13.8_2-r0 seems to be broken for me. It seems to be missing some values from the .env or rtorrent-rutorrent.env

@stickz
Copy link
Contributor

stickz commented Apr 28, 2024

@AntAreS24 You need to pull docker edge. docker pull crazymax/rtorrent-rutorrent:edge

@AntAreS24
Copy link
Author

I double checked my steps and I figured out why it's not loading the torrents. I forgot to clean the .session folder and all the existing .torrent were there. I wiped the entire folder, restarted the compose and i can now load all 950.

I'm now going through the tedious process and rechecking all of them...

I'll try the restart (on the old version as I know it's working) first, then, if everything is working as expected, I'll update to edge

@stickz
Copy link
Contributor

stickz commented Apr 28, 2024

Sounds good. I would recommend waiting until #341 is merged before going to edge. There is anther problem.

@AntAreS24
Copy link
Author

@stickz thank you for all the help. It took a whole (almost 48h) to force recheck all torrents that I had... I stopped and restarted it and all torrents were present. It was very painful and I'm hoping I won't have to do that again 😄

Since it's working, I'll wait a bit to upgrade to egde

@AntAreS24
Copy link
Author

For those having similar issues, I basically had to:

  • Start clean a new instance
  • Since I didn't have all the original torrent files, but the session torrent file, I had to change their name using the following script:
#!/bin/bash
today=$(date +"%Y%m%d")
target_file="list_$today.txt"
echo $target_file

touch $target_file
for file in *.torrent
do
  echo $(echo $file) $(aria2c -S $file |grep '^  1|'|sed 's/^  1|//' |cut -d"/" -f 2) >> $target_file
done
  • I then ran a mv <hash>.torrent <target_name>torrent
  • I moved all those files in the watch folder
  • Since all my data was in an NAS, I had to change the location of ALL torrent to the NAS path
  • I force recheck all files (I was doing that in batch otherwise the UI was not responding)
  • I labelled them again, and it's not fully up and running!

@AntAreS24 AntAreS24 reopened this May 9, 2024
@AntAreS24
Copy link
Author

AntAreS24 commented May 9, 2024

I had to restart the service this morning and only 494 out of 956 torrent got loaded again :(

I am still on the old image: crazymax/rtorrent-rutorrent:4.2.9-0.9.8_2-0.13.8_2

rtorrent-rutorrent       | [09-May-2024 09:58:51] NOTICE: Terminating ...
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 15 (SIGTERM) received from 505, exiting
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 541#541: exiting
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 540#540: exiting
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 543#543: exiting
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 542#542: exiting
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 542#542: exit
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 541#541: exit
rtorrent-rutorrent       | [09-May-2024 09:58:51] NOTICE: exiting, bye-bye!
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 543#543: exit
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 540#540: exit
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 17 (SIGCHLD) received from 542
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: worker process 542 exited with code 0
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 29 (SIGIO) received
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 17 (SIGCHLD) received from 541
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: worker process 541 exited with code 0
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 29 (SIGIO) received
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 17 (SIGCHLD) received from 543
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: worker process 543 exited with code 0
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 29 (SIGIO) received
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: signal 17 (SIGCHLD) received from 540
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: worker process 540 exited with code 0
rtorrent-rutorrent       | 2024/05/09 09:58:51 [notice] 510#510: exit
rtorrent-rutorrent       | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
rtorrent-rutorrent       | [s6-init] ensuring user provided files have correct perms...exited 0.
rtorrent-rutorrent       | [fix-attrs.d] applying ownership & permissions fixes...
rtorrent-rutorrent       | [fix-attrs.d] done.
rtorrent-rutorrent       | [cont-init.d] executing container initialization scripts...
rtorrent-rutorrent       | [cont-init.d] 00-fix-logs.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 00-fix-logs.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 01-fix-uidgid.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 01-fix-uidgid.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 02-fix-perms.sh: executing...
rtorrent-rutorrent       | Fixing perms...
rtorrent-rutorrent       | [cont-init.d] 02-fix-perms.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 03-config.sh: executing...
rtorrent-rutorrent       | Setting timezone to Australia/Sydney...
rtorrent-rutorrent       | Setting PHP-FPM configuration...
rtorrent-rutorrent       | Setting PHP INI configuration...
rtorrent-rutorrent       | Setting OpCache configuration...
rtorrent-rutorrent       | Setting Nginx configuration...
rtorrent-rutorrent       | Setting Nginx XMLRPC over SCGI configuration...
rtorrent-rutorrent       | Setting Nginx ruTorrent configuration...
rtorrent-rutorrent       | Setting Nginx WebDAV configuration...
rtorrent-rutorrent       | Update healthcheck script...
rtorrent-rutorrent       | Initializing files and folders...
rtorrent-rutorrent       | rpc.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | rutorrent.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | webdav.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | Checking rTorrent local configuration...
rtorrent-rutorrent       | Checking rTorrent configuration...
rtorrent-rutorrent       | Bootstrapping ruTorrent configuration...
rtorrent-rutorrent       | ln: failed to create symbolic link '/var/www/rutorrent/conf/users/users': Not supported
rtorrent-rutorrent       | Removing core plugin httprpc...
rtorrent-rutorrent       | Setting custom config for create plugin...
rtorrent-rutorrent       | Checking ruTorrent custom plugins...
rtorrent-rutorrent       | Checking ruTorrent plugins configuration...
rtorrent-rutorrent       | Checking ruTorrent custom themes...
rtorrent-rutorrent       | Setting GeoIP2 databases for geoip2 plugin...
rtorrent-rutorrent       | Fixing perms...
rtorrent-rutorrent       | [cont-init.d] 03-config.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 04-create-services.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 04-create-services.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] ~-socklog: executing...
rtorrent-rutorrent       | [cont-init.d] ~-socklog: exited 0.
rtorrent-rutorrent       | [cont-init.d] done.
rtorrent-rutorrent       | [services.d] starting services
rtorrent-rutorrent       | [services.d] done.
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: using the "epoll" event method
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: nginx/1.24.0
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: OS: Linux 5.15.0-105-generic
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: getrlimit(RLIMIT_NOFILE): 32000:40000
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: start worker processes
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: start worker process 767
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: start worker process 769
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: start worker process 770
rtorrent-rutorrent       | 2024/05/09 10:00:54 [notice] 743#743: start worker process 771
rtorrent-rutorrent       | [09-May-2024 10:00:54] NOTICE: fpm is running, pid 746
rtorrent-rutorrent       | [09-May-2024 10:00:54] NOTICE: ready to handle connections
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:01:05 +1000] "GET /plugins/diskspace/action.php?_=1715212418244 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:01:16 +1000] "GET /plugins/diskspace/action.php?_=1715212418245 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:01:27 +1000] "GET /plugins/diskspace/action.php?_=1715212418246 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 2024/05/09 10:01:34 [info] 767#767: *1 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 192.168.x.xxx, server: , request: "POST /plugins/rpc/rpc.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "192.168.0.3:8080", referrer: "http://192.168.0.3:8080/"
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:01:34 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 499 0 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:01:38 +1000] "GET /plugins/diskspace/action.php?_=1715212418247 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:01:49 +1000] "GET /plugins/diskspace/action.php?_=1715212418248 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:01:59 +1000] "GET /plugins/diskspace/action.php?_=1715212418249 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:00 +1000] "GET / HTTP/1.1" 304 0 "-" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:00 +1000] "GET /php/getsettings.php?_=1715212920671 HTTP/1.1" 200 4881 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:01 +1000] "GET /php/getplugins.php HTTP/1.1" 200 327547 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:01 +1000] "POST /php/setsettings.php HTTP/1.1" 200 5 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /plugins/trafic/action.php HTTP/1.1" 200 26306 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /plugins/create/action.php HTTP/1.1" 200 2 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /php/setsettings.php HTTP/1.1" 200 5 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "GET /plugins/cpuload/action.php?_=1715212920672 HTTP/1.1" 200 14 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "GET /plugins/diskspace/action.php?_=1715212920673 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /plugins/_task/action.php HTTP/1.1" 200 2 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /plugins/rss/action.php HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /plugins/history/action.php HTTP/1.1" 200 92780 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /plugins/rss/action.php HTTP/1.1" 200 35 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:03 +1000] "POST /plugins/check_port/action.php?init HTTP/1.1" 200 53 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:04 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 803734 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:04 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 310 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:04 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 481 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 2024/05/09 10:02:04 [warn] 767#767: *17 a client request body is buffered to a temporary file /tmp/nginx/1/00/0000000001, client: 192.168.x.xxx, server: , request: "POST /plugins/rpc/rpc.php HTTP/1.1", host: "192.168.0.3:8080", referrer: "http://192.168.0.3:8080/"
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:04 +1000] "GET /plugins/cpuload/action.php?_=1715212920674 HTTP/1.1" 200 14 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:04 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 237415 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:13 +1000] "GET /plugins/diskspace/action.php?_=1715212920675 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:20 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 803891 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:20 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 482 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:20 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 309 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:20 +1000] "GET /plugins/cpuload/action.php?_=1715212920676 HTTP/1.1" 200 14 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:23 +1000] "GET /plugins/diskspace/action.php?_=1715212920677 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:34 +1000] "GET /plugins/diskspace/action.php?_=1715212920678 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:37 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 803891 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:38 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 482 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:38 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 309 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:38 +1000] "GET /plugins/cpuload/action.php?_=1715212920679 HTTP/1.1" 200 14 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:45 +1000] "GET /plugins/diskspace/action.php?_=1715212920680 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:55 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 803891 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:56 +1000] "GET /plugins/diskspace/action.php?_=1715212920681 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:56 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 482 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:56 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 308 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:02:56 +1000] "GET /plugins/cpuload/action.php?_=1715212920682 HTTP/1.1" 200 14 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:07 +1000] "GET /plugins/diskspace/action.php?_=1715212920683 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:13 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 803891 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:15 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 482 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:15 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 308 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:15 +1000] "GET /plugins/cpuload/action.php?_=1715212920684 HTTP/1.1" 200 14 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:17 +1000] "GET /plugins/diskspace/action.php?_=1715212920685 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:28 +1000] "GET /plugins/diskspace/action.php?_=1715212920686 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:31 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 803890 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:32 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 482 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:32 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 308 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:32 +1000] "GET /plugins/cpuload/action.php?_=1715212920687 HTTP/1.1" 200 14 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:39 +1000] "GET /plugins/diskspace/action.php?_=1715212920688 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" 
rtorrent-rutorrent       | 192.168.x.xxx - - [09/May/2024:10:03:49 +1000] "POST /plugins/rpc/rpc.php HTTP/1.1" 200 803887 "http://192.168.0.3:8080/" 

@stickz
Copy link
Contributor

stickz commented May 10, 2024

Upgrade image to rule out RPC plugin. Latest is stable now.

@AntAreS24
Copy link
Author

Nope... Upgraded to latest, and every time I restart, the number of session is halfed:

rtorrent-rutorrent-logs  | 1715381521 N rtorrent main: Starting thread.
rtorrent-rutorrent-logs  | 1715381521 N rtorrent scgi: Starting thread.
rtorrent-rutorrent-logs  | 1715381828 N rtorrent scgi: Shutting down thread.
rtorrent-rutorrent-logs  | 1715381835 N rtorrent main: Shutting down thread.
rtorrent-rutorrent-logs  | 1715381835 N rtorrent disk: Shutting down thread.
rtorrent-rutorrent       | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
rtorrent-rutorrent       | [s6-init] ensuring user provided files have correct perms...exited 0.
rtorrent-rutorrent       | [fix-attrs.d] applying ownership & permissions fixes...
rtorrent-rutorrent       | [fix-attrs.d] done.
rtorrent-rutorrent       | [cont-init.d] executing container initialization scripts...
rtorrent-rutorrent       | [cont-init.d] 00-fix-logs.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 00-fix-logs.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 01-fix-uidgid.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 01-fix-uidgid.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 02-fix-perms.sh: executing...
rtorrent-rutorrent       | Fixing perms...
rtorrent-rutorrent       | [cont-init.d] 02-fix-perms.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 03-config.sh: executing...
rtorrent-rutorrent       | Setting timezone to Australia/Sydney...
rtorrent-rutorrent       | Setting PHP-FPM configuration...
rtorrent-rutorrent       | Setting PHP INI configuration...
rtorrent-rutorrent       | Setting OpCache configuration...
rtorrent-rutorrent       | Setting Nginx configuration...
rtorrent-rutorrent       | Setting Nginx XMLRPC over SCGI configuration...
rtorrent-rutorrent       | Setting Nginx ruTorrent configuration...
rtorrent-rutorrent       | Setting Nginx WebDAV configuration...
rtorrent-rutorrent       | Update healthcheck script...
rtorrent-rutorrent       | Initializing files and folders...
rtorrent-rutorrent       | rpc.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | rutorrent.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | webdav.htpasswd is empty, removing authentication...
rtorrent-rutorrent       | Checking rTorrent local configuration...
rtorrent-rutorrent       | Checking rTorrent configuration...
rtorrent-rutorrent       | Bootstrapping ruTorrent configuration...
rtorrent-rutorrent       | Setting custom config for create plugin...
rtorrent-rutorrent       | Checking ruTorrent custom plugins...
rtorrent-rutorrent       | Checking ruTorrent plugins configuration...
rtorrent-rutorrent       | Checking ruTorrent custom themes...
rtorrent-rutorrent       | Setting GeoIP2 databases for geoip2 plugin...
rtorrent-rutorrent       | Fixing perms...
rtorrent-rutorrent       | [cont-init.d] 03-config.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] 04-create-services.sh: executing...
rtorrent-rutorrent       | [cont-init.d] 04-create-services.sh: exited 0.
rtorrent-rutorrent       | [cont-init.d] ~-socklog: executing...
rtorrent-rutorrent       | [cont-init.d] ~-socklog: exited 0.
rtorrent-rutorrent       | [cont-init.d] done.
rtorrent-rutorrent       | [services.d] starting services
rtorrent-rutorrent       | [11-May-2024 08:59:43] NOTICE: fpm is running, pid 511
rtorrent-rutorrent       | [11-May-2024 08:59:43] NOTICE: ready to handle connections
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: using the "epoll" event method
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: nginx/1.24.0
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: OS: Linux 5.15.0-106-generic
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: getrlimit(RLIMIT_NOFILE): 32000:40000
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: start worker processes
rtorrent-rutorrent       | [services.d] done.
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: start worker process 535
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: start worker process 536
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: start worker process 537
rtorrent-rutorrent       | 2024/05/11 08:59:43 [notice] 518#518: start worker process 538
rtorrent-rutorrent       | 192.168.2.196 - - [11/May/2024:08:59:46 +1000] "GET /plugins/diskspace/action.php?_=1715381573883 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
rtorrent-rutorrent-logs  | 1715381983 N rtorrent main: Starting thread.
rtorrent-rutorrent-logs  | 1715381983 N rtorrent scgi: Starting thread.
rtorrent-rutorrent       | 192.168.2.196 - - [11/May/2024:08:59:57 +1000] "GET /plugins/diskspace/action.php?_=1715381573884 HTTP/1.1" 200 45 "http://192.168.0.3:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"

After 3 restarts, I now have only 61 torrents loaded...

@stickz
Copy link
Contributor

stickz commented May 17, 2024

@AntAreS24 Sorry for the delayed response. This looks like a configuration or hardware issue with your NAS. Possible causes include memory failures, disk failures, inaccessible file paths etc.

I can not be of any more assistance to you. We have successfully resolved all of the issues with the docker container version upgrade. This next thing I would recommend is a memory test to detect possible bad sectors with RAM.

@AntAreS24
Copy link
Author

AntAreS24 commented May 18, 2024

@stickz, understand. Thank you for the help so far.

I did notice that, when I restart only same of them are ".torrent".

.session > ls -la *.torrent
-rw-r--r-- 1 user user  29433 May 18 14:29 0A21C1F19331BA4849F4E2ECD9955E623DBB3285.torrent
-rw-r--r-- 1 user user 392454 May 18 14:29 0CD638BA2DA2AE82777B558FB38B64F86A6F215F.torrent
-rw-r--r-- 1 user user   8429 May 18 14:29 36267A4580F396A82A65997F36A214C4E8F8C312.torrent
-rw-r--r-- 1 user user  11462 May 18 14:29 57BD89B0F043DF7704C9C6129AC8808BEF99CE6E.torrent
-rw-r--r-- 1 user user 280342 May 18 14:29 5E61708E37D73826AE662096B4C9CBA2736C9B7F.torrent
-rw-r--r-- 1 user user  18629 May 18 14:29 899D2D9745119B054A8374A39C45FA9336A9F86D.torrent
-rw-r--r-- 1 user user  21428 May 18 14:29 9E33F537AE4545A168E49E7299AEE0AFF506FCD8.torrent
-rw-r--r-- 1 user user  28407 May 18 14:29 A614B18B50EC2966C0898D9A4A7F7609A6BA8742.torrent
-rw-r--r-- 1 user user  30800 May 18 14:29 B8D7837BB9FBDFED4B58B548124541F53638FBD1.torrent
-rw-r--r-- 1 user user  40541 May 18 14:29 BEAE0BCA1BEF3ADAA03AEE9291459235FB9F487F.torrent

While the rest is:

-rwxrwxr-x 1 user user  233 May 18 14:24 FF77629B4E2DBEB33A4DCC7B1C266D6E6D6CD16E.torrent.libtorrent_resume
-rwxrwxr-x 1 user user  14K May 18 14:24 FF77629B4E2DBEB33A4DCC7B1C266D6E6D6CD16E.torrent.new
-rwxrwxr-x 1 user user  821 May 18 14:24 FF77629B4E2DBEB33A4DCC7B1C266D6E6D6CD16E.torrent.rtorrent
-rwxrwxr-x 1 user user  233 May 18 14:24 FFB5B4A7585DC56F30D9CF8C230EF8593CF6CDF3.torrent.libtorrent_resume
-rwxrwxr-x 1 user user  15K May 18 14:24 FFB5B4A7585DC56F30D9CF8C230EF8593CF6CDF3.torrent.new
-rwxrwxr-x 1 user user  824 May 18 14:24 FFB5B4A7585DC56F30D9CF8C230EF8593CF6CDF3.torrent.rtorrent

Do you know this would happen, and how to recover from that?

UPDATE #1:
I had all the sessions stored as a mounted CIFS storage. I now moved that as a local storage. I'll see how it goes.

UPDATE #2:
I stopped the containers, manually renamed all *.torrent.new to *.torrent and restarted them and they are all showing up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants