crazy-max / docker-rtorrent-rutorrent

rTorrent and ruTorrent Docker image
MIT License
457 stars 103 forks source link

Repeating error in logs on latest version: /etc/rtorrent/.rtlocal.rc:50: Not a value. #336

Closed RZR7332 closed 1 month ago

RZR7332 commented 2 months ago

Support guidelines

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

Description

Repeating logs in container after pulling latest image:

rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.

That line is as follows: network.send_buffer.size.set = @RT_SEND_BUFFER_SIZE@

Have tried setting in the .env file to 32MB but this does not work, nor can I find any reference as to how it should be set.

Expected behaviour

Container should start normally.

Actual behaviour

Web interface is never available as log message keeps repeating endlessly.

Steps to reproduce

Pull latest image, restart container.

Docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc., v2.15.1-qnap1)

Server:
 Containers: 3
  Running: 3
  Paused: 0
  Stopped: 0
 Images: 12
 Server Version: 20.10.27-qnap1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay qnet
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux kata-runtime nvidia-runtime runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
 runc version: v1.1.8-0-g82f18fe0
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.10.60-qnap
 Operating System: QTS 5.1.6 (20240402)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 1.628GiB
 Name: NAS62FD9E
 ID: BHE7:HZ33:ZCV5:G6UG:SZTZ:4QER:SHYJ:4I67:OEPL:NJYT:WPFD:O6KN
 Docker Root Dir: /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker
 Debug Mode: true
  File Descriptors: 77
  Goroutines: 66
  System Time: 2024-04-27T15:55:00.120381056+02:00
  EventsListeners: 1
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 172.29.0.0/16, Size: 22

Docker Compose config

name: rutorrent-crazy-max
services:
  geoip-updater:
    container_name: rtorrent_geoip
    environment:
      DOWNLOAD_PATH: /data
      EDITION_IDS: GeoLite2-City,GeoLite2-Country,GeoLite2-ASN
      LICENSE_KEY: [redacted]
      LOG_JSON: "false"
      LOG_LEVEL: info
      SCHEDULE: 0 0 * * 0
      TZ: Africa/Johannesburg
    image: crazymax/geoip-updater:latest
    networks:
      rtorrent-private: null
    restart: always
    volumes:
    - type: bind
      source: /share/CACHEDEV1_DATA/homes/user/rutorrent-crazy-max/data/geoip
      target: /data
      bind:
        create_host_path: true
  rtorrent-logs:
    command:
    - bash
    - -c
    - tail -f /log/*.log
    container_name: rtorrent_logs
    depends_on:
      rtorrent-rutorrent:
        condition: service_started
    image: bash
    networks:
      rtorrent-private: null
    restart: always
    volumes:
    - type: bind
      source: /share/CACHEDEV1_DATA/homes/user/rutorrent-crazy-max/data/rtorrent/log
      target: /log
      bind:
        create_host_path: true
  rtorrent-rutorrent:
    container_name: rtorrent
    environment:
      AUTH_DELAY: 0s
      LOG_ACCESS: "true"
      LOG_IP_VAR: remote_addr
      MAX_FILE_UPLOADS: "50"
      MEMORY_LIMIT: 256M
      OPCACHE_MEM_SIZE: "128"
      PGID: "100"
      PUID: "500"
      REAL_IP_FROM: 0.0.0.0/32
      REAL_IP_HEADER: X-Forwarded-For
      RT_DHT_PORT: "6881"
      RT_INC_PORT: "51413"
      RT_LOG_EXECUTE: "false"
      RT_LOG_LEVEL: info
      RT_LOG_XMLRPC: "false"
      RT_RECEIVE_BUFFER_SIZE: 32MB
      RT_SEND_BUFFER_SIZE: 32MB
      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: Africa/Johannesburg
      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:
    - "8000"
    - "8080"
    - "9000"
    - "51413"
    image: crazymax/rtorrent-rutorrent:latest
    networks:
      rtorrent-private: null
      rtorrent-public: null
    ports:
    - target: 8080
      published: "8080"
      protocol: tcp
    - target: 9000
      published: "9000"
      protocol: tcp
    - target: 51413
      published: "51413"
      protocol: tcp
    restart: always
    stop_grace_period: 45s
    ulimits:
      nofile:
        soft: 32000
        hard: 40000
      nproc: 65535
    volumes:
    - type: bind
      source: /share/CACHEDEV1_DATA/homes/user/rutorrent-crazy-max/data
      target: /data
      bind:
        create_host_path: true
    - type: bind
      source: /share/CACHEDEV1_DATA/MEDIA
      target: /downloads
      bind:
        create_host_path: true
    - type: bind
      source: /share/CACHEDEV1_DATA/homes/user/rutorrent-crazy-max/passwd
      target: /passwd
      bind:
        create_host_path: true
networks:
  rtorrent-private:
    name: rtorrent-private
  rtorrent-public:
    name: rtorrent-public

Logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing... 
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing... 
Switching to PGID 100...
Switching to PUID 500...
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing... 
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 03-config.sh: executing... 
Setting timezone to Africa/Johannesburg...
Setting PHP-FPM configuration...
Setting PHP INI configuration...
Setting OpCache configuration...
Setting Nginx configuration...
Setting Nginx XMLRPC over SCGI configuration...
Setting Nginx ruTorrent configuration...
Setting Nginx WebDAV configuration...
Update healthcheck script...
Initializing files and folders...
rpc.htpasswd is empty, removing authentication...
rutorrent.htpasswd is empty, removing authentication...
webdav.htpasswd is empty, removing authentication...
Checking rTorrent local configuration...
Checking rTorrent configuration...
Bootstrapping ruTorrent configuration...
Removing core plugin httprpc...
Setting custom config for create plugin...
Checking ruTorrent custom plugins...
Checking ruTorrent plugins configuration...
Checking ruTorrent custom themes...
Setting GeoIP2 databases for geoip2 plugin...
Fixing perms...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-create-services.sh: executing... 
[cont-init.d] 04-create-services.sh: exited 0.
[cont-init.d] ~-socklog: executing... 
[cont-init.d] ~-socklog: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2024/04/27 15:51:30 [notice] 551#551: using the "epoll" event method
2024/04/27 15:51:30 [notice] 551#551: nginx/1.24.0
2024/04/27 15:51:30 [notice] 551#551: OS: Linux 5.10.60-qnap
2024/04/27 15:51:30 [notice] 551#551: getrlimit(RLIMIT_NOFILE): 32000:40000
2024/04/27 15:51:30 [notice] 551#551: start worker processes
2024/04/27 15:51:30 [notice] 551#551: start worker process 571
2024/04/27 15:51:30 [notice] 551#551: start worker process 572
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
[27-Apr-2024 15:51:33] NOTICE: fpm is running, pid 547
[27-Apr-2024 15:51:33] NOTICE: ready to handle connections
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
Caught Segmentation fault, dumping stack:
Stack dump not enabled.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.

Additional info

No configuration changes made between image pulls.

ricetim commented 2 months ago

I am also seeing this bug. Reverting appears to have resolved it for now.

RZR7332 commented 2 months ago

I am also seeing this bug. Reverting appears to have resolved it for now.

Which image did you revert to? If you wouldn't mind letting me know, I would appreciate it.

ricetim commented 2 months ago

I am also seeing this bug. Reverting appears to have resolved it for now.

Which image did you revert to? If you wouldn't mind letting me know, I would appreciate it.

crazymax/rtorrent-rutorrent:4.2.9-0.9.8_2-0.13.8_2

stickz commented 2 months ago

@RZR7332 Please read the documentation. RT_SEND_BUFFER_SIZE and RT_RECEIVE_BUFFER_SIZE needs to be set to 32M. MB is most likely the reason for failure. Also in RU_REMOVE_CORE_PLUGINS you need to remove httprpc for ruTorrent v4.3 compatibility.

ricetim commented 2 months ago

@RZR7332 Please read the documentation. RT_SEND_BUFFER_SIZE and RT_RECEIVE_BUFFER_SIZE needs to be set to 32M. MB is most likely the reason for failure. Also in RU_REMOVE_CORE_PLUGINS you need to remove httprpc for ruTorrent v4.3 compatibility.

I didn't have anything declared for RT_SEND_BUFFER_SIZE and RT_RECEIVE_BUFFER_SIZE any my docker-compose.yaml and I get the same error.

After reading your message, I tried changing my docker-compose.yaml to the following and still received the error.

  rtorrent:
    container_name: rtorrent
    image: crazymax/rtorrent-rutorrent:latest
    environment:
      PUID: '1000'
      PGID: '1000'
      RT_SEND_BUFFER_SIZE: 32M
      RT_RECEIVE_BUFFER_SIZE: 32M
stickz commented 1 month ago

@ricetim could you open a new issue report and go through all the steps? This is not reproduceable on a fresh image. My response was specific to this user, given the information they provided in the issue report.

gsanchez2004 commented 1 month ago

Have the same error i´m doing direct run , tried this : docker run -d --name rtorrent_rutorrent --env RT_SEND_BUFFER_SIZE=32M --env RT_RECEIVE_BUFFER_SIZE=32M --env RU_REMOVE_CORE_PLUGINS=httprpc --ulimit nproc=65535 --ulimit nofile=32000:40000 -p 6881:6881/udp -p 8000:8000 -p 8080:8080 -p 9000:9000 -p 50000:50000 -v $(pwd)/data:/data -v $(pwd)/downloads:/downloads -v $(pwd)/passwd:/passwd crazymax/rtorrent-rutorrent:latest

but still doesn´t work.

edited manually the file /etc/rtorrent/.rtlocal.rc and added the 32M to both values and the container started, but still not work, reverting to version mentioned here it starts working again.

stickz commented 1 month ago

Have the same error i´m doing direct run , tried this : docker run -d --name rtorrent_rutorrent --env RT_SEND_BUFFER_SIZE=32M --env RT_RECEIVE_BUFFER_SIZE=32M --env RU_REMOVE_CORE_PLUGINS=httprpc --ulimit nproc=65535 --ulimit nofile=32000:40000 -p 6881:6881/udp -p 8000:8000 -p 8080:8080 -p 9000:9000 -p 50000:50000 -v (pwd)/data:/data−v(pwd)/downloads:/downloads -v $(pwd)/passwd:/passwd crazymax/rtorrent-rutorrent:latest

but still doesn´t work.

edited manually the file /etc/rtorrent/.rtlocal.rc and added the 32M to both values and the container started, but still not work, reverting to version mentioned here it starts working again.

@gsanchez2004 Remove this line --env RU_REMOVE_CORE_PLUGINS=httprpc for crazymax/rtorrent-rutorrent:latest.

newadventure079 commented 1 month ago

I think the issue here is none of us had RT_SEND_BUFFER_SIZE or RT_RECEIVE_BUFFER_SIZE specified and it's giving an error, so anyone that upgrades from the previous version will have an issue. It seems the default values aren't working

EastArctica commented 1 month ago

I think the issue here is none of us had RT_SEND_BUFFER_SIZE or RT_RECEIVE_BUFFER_SIZE specified and it's giving an error, so anyone that upgrades from the previous version will have an issue. It seems the default values aren't working

Not quite... If you go into the .rtlocal.rc file and modify it to set it to 4M (default) it works as expected. Also if you set those in environment variables, I've had no luck with it.

newadventure079 commented 1 month ago

That's my point. We shouldn't have to go into .rtlocal.rc and edit it

EastArctica commented 1 month ago

That's my point. We shouldn't have to go into .rtlocal.rc and edit it

My comment was meant to just say that it seems deeper than just the default values being wrong. They're correct being set at 4M but there's some issue in them being set. Not sure if that made sense or not

scsa20 commented 1 month ago

Can confirmed that I get the same issue, even after trying to add the variables. I use portainer straight up and not using a stack. I've switched back to crazymax/rtorrent-rutorrent:4.2.9-0.9.8_2-0.13.8_2 for the time being.

Hipoglos commented 1 month ago

same issue, rtorrent just doesn't start. rollbacked to 4.2.9-0.9.8_2-0.13.8_2.

To reproduce the error, used the docker compose files here: https://github.com/crazy-max/docker-rtorrent-rutorrent/tree/master/examples/compose

gsanchez2004 commented 1 month ago

Have the same error i´m doing direct run , tried this : docker run -d --name rtorrent_rutorrent --env RT_SEND_BUFFER_SIZE=32M --env RT_RECEIVE_BUFFER_SIZE=32M --env RU_REMOVE_CORE_PLUGINS=httprpc --ulimit nproc=65535 --ulimit nofile=32000:40000 -p 6881:6881/udp -p 8000:8000 -p 8080:8080 -p 9000:9000 -p 50000:50000 -v (pwd)/data:/data−v(pwd)/downloads:/downloads -v $(pwd)/passwd:/passwd crazymax/rtorrent-rutorrent:latest but still doesn´t work. edited manually the file /etc/rtorrent/.rtlocal.rc and added the 32M to both values and the container started, but still not work, reverting to version mentioned here it starts working again.

@gsanchez2004 Remove this line --env RU_REMOVE_CORE_PLUGINS=httprpc for crazymax/rtorrent-rutorrent:latest.

Did it , same issue , i just added that environment variable because it says that on the comment below :

@RZR7332 Please read the documentation. RT_SEND_BUFFER_SIZE and RT_RECEIVE_BUFFER_SIZE needs to be set to 32M. MB is most likely the reason for failure. Also in RU_REMOVE_CORE_PLUGINS you need to remove httprpc for ruTorrent v4.3 compatibility.

Still the same issue. just starts modifying the rtlocal.rc file but is not permamenent and is not working either given me a 404 error inside de rtorrent screen.

only fix that worked for me was going back to the previous version.

daschiller commented 1 month ago

@stickz The placeholders for the new variables in the .rtlocal.rc template do not get substituted in the sed command here. I can prepare a PR tomorrow.

stickz commented 1 month ago

@stickz The placeholders for the new variables in the .rtlocal.rc template do not get substituted in the sed command here. I can prepare a PR tomorrow.

I made a PR thanks for catching that.

dama-de commented 1 month ago

This still happens for me on the latest version.

Ixiruss commented 1 month ago

It's still happening to me also from the latest version (pulled few mins ago on crazymax/rtorrent-rutorrent:latest)

daschiller commented 1 month ago

@Ixiruss @dama-de The "latest" tag on Docker hub hasn't been updated yet.

BelgianMonster commented 1 month ago

Having the same issues, reverted back to previous release and it is working now

stickz commented 1 month ago

@Ixiruss @dama-de @BelgianMonster Please pull docker edge for the changes. It was fixed in #338. docker pull crazymax/rtorrent-rutorrent:edge

rogales commented 1 month ago

Having the same issues, reverted back to previous release and it is working now

any tips how could i do it? i've installed latest version of rutorrent-crazymax from apps bookmark on my unraid. thank You.

scsa20 commented 1 month ago

Latest edge version works, just need to make sure you add RT_SEND_BUFFER_SIZE and RT_RECEIVE_BUFFER_SIZE variables setting to 32M for both

daschiller commented 1 month ago

Latest edge version works, just need to make sure you add RT_SEND_BUFFER_SIZE and RT_RECEIVE_BUFFER_SIZE variables setting to 32M for both

You don't have to set them explicitly. They both default to "4M".

burajiruhito commented 1 month ago

When I enter "crazymax/rtorrent-rutorrent" the WebUI does not start and the message appears in the log:

rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value

If I return to the previous version using "crazymax/rtorrent-rutorrent:4.2.9-0.9.8_2-0.13.8_2" it works normally.

If I use "crazymax/rtorrent-rutorrent:edge" it also works and apparently edge includes the new version, so I don't know why it is necessary to put edge to work.

andrewmeyer commented 1 month ago

can confirm: switching to edge works. Hopefully it gets pushed to main soon

newadventure079 commented 1 month ago

If I use "crazymax/rtorrent-rutorrent:edge" it also works and apparently edge includes the new version, so I don't know why it is necessary to put edge to work.

This is because the fix is only on the edge branch right now. When it gets pushed to main and released, you can switch back to the latest tag

RyleaStark commented 1 month ago

Confirming edge resolves the issue described in this thread.