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

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

Closed
3 tasks done
Hipoglos opened this issue Apr 28, 2024 · 18 comments

Comments

@Hipoglos
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

docker stays in "unhealthy" status, and rtorrent is not starting.

Expected behaviour

Container should start normally.

Actual behaviour

rtorrent is not working

Steps to reproduce

  1. Host running Debian 12
  2. Use the docker compose files listed here: https://github.com/crazy-max/docker-rtorrent-rutorrent/tree/master/examples/compose
  3. docker compose up -d

Docker info

# docker info
Client: Docker Engine - Community
 Version:    26.1.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.26.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 4
  Running: 4
  Paused: 0
  Stopped: 0
 Images: 4
 Server Version: 26.1.0
 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 splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: -
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.0-20-amd64
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 1.921GiB
 Name: seedbox
 ID: -
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker Compose config

# docker compose config
name: seedbox
services:
  geoip-updater:
    environment:
      DOWNLOAD_PATH: /data
      EDITION_IDS: GeoLite2-City,GeoLite2-Country
      LICENSE_KEY: [removed]
      LOG_JSON: "false"
      LOG_LEVEL: info
      SCHEDULE: 0 0 * * 0
      TZ: Europe/Paris
    image: crazymax/geoip-updater:latest
    networks:
      default: null
    restart: always
    volumes:
      - type: bind
        source: /srv/rutorrent/data/geoip
        target: /data
        bind:
          create_host_path: true
  rtorrent-logs:
    command:
      - bash
      - -c
      - tail -f /log/*.log
    depends_on:
      rtorrent-rutorrent:
        condition: service_started
        required: true
    image: bash
    networks:
      default: null
    restart: always
    volumes:
      - type: bind
        source: /srv/rutorrent/data/rtorrent/log
        target: /log
        bind:
          create_host_path: true
  rtorrent-rutorrent:
    environment:
      AUTH_DELAY: 0s
      LOG_ACCESS: "true"
      LOG_IP_VAR: remote_addr
      MAX_FILE_UPLOADS: "50"
      MEMORY_LIMIT: 256M
      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: "50511"
      RT_LOG_EXECUTE: "false"
      RT_LOG_LEVEL: info
      RT_LOG_XMLRPC: "false"
      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_RPC_TIME_OUT: "5"
      RU_SAVE_UPLOADED_TORRENTS: "true"
      RU_SCHEDULE_RAND: "10"
      RUTORRENT_AUTHBASIC_STRING: ruTorrent restricted access
      RUTORRENT_PORT: "8080"
      TZ: Europe/Paris
      UPLOAD_MAX_SIZE: 16M
      WAN_IP: [removed]
      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"
      - "50511"
    image: crazymax/rtorrent-rutorrent:latest
    networks:
      default: null
    ports:
      - target: 6881
        published: "6881"
        protocol: udp
      - target: 8080
        published: "8080"
        protocol: tcp
      - target: 9000
        published: "9000"
        protocol: tcp
      - target: 50511
        published: "50511"
        protocol: tcp
    restart: always
    ulimits:
      nofile:
        soft: 32000
        hard: 40000
      nproc: 65535
    volumes:
      - type: bind
        source: /srv/rutorrent/data
        target: /data
        bind:
          create_host_path: true
      - type: bind
        source: /srv/rutorrent/downloads
        target: /downloads
        bind:
          create_host_path: true
      - type: bind
        source: /srv/rutorrent/passwd
        target: /passwd
        bind:
          create_host_path: true
      - type: bind
        source: /usr/bin/7z
        target: /usr/bin/7z
        bind:
          create_host_path: true
      - type: bind
        source: /usr/bin/rar
        target: /usr/bin/rar
        bind:
          create_host_path: true
      - type: bind
        source: /usr/bin/unrar
        target: /usr/bin/unrar
        bind:
          create_host_path: true
networks:
  default:
    name: seedbox_default

Logs

# docker compose logs -f
rtorrent-logs-1       | 1714252722 N rtorrent main: Starting thread.
rtorrent-logs-1       | 1714252722 N rtorrent scgi: Starting thread.
rtorrent-logs-1       | 1714296443 N rtorrent scgi: Shutting down thread.
rtorrent-logs-1       | 1714296446 N rtorrent main: Shutting down thread.
rtorrent-logs-1       | 1714296446 N rtorrent disk: Shutting down thread.
geoip-updater-1       | Sun, 28 Apr 2024 13:06:22 CEST INF Starting geoip-updater v1.10.0
geoip-updater-1       | Sun, 28 Apr 2024 13:06:22 CEST INF Downloading GeoLite2-City.tar.gz archive... edition_id=GeoLite2-City
geoip-updater-1       | Sun, 28 Apr 2024 13:06:23 CEST INF GeoLite2-City.mmdb database successfully updated edition_id=GeoLite2-City modtime=2024-04-26T17:31:35+02:00 size=51.44MB
geoip-updater-1       | Sun, 28 Apr 2024 13:06:23 CEST INF Downloading GeoLite2-Country.tar.gz archive... edition_id=GeoLite2-Country
geoip-updater-1       | Sun, 28 Apr 2024 13:06:24 CEST INF GeoLite2-Country.mmdb database successfully updated edition_id=GeoLite2-Country modtime=2024-04-26T17:33:31+02:00 size=6.449MB
geoip-updater-1       | Sun, 28 Apr 2024 13:06:24 CEST INF Cron initialized with schedule 0 0 * * 0
geoip-updater-1       | Sun, 28 Apr 2024 13:06:24 CEST INF Next run in 6 days 10 hours (2024-05-05 00:00:00 +0200 CEST)
rtorrent-rutorrent-1  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
rtorrent-rutorrent-1  | [s6-init] ensuring user provided files have correct perms...exited 0.
rtorrent-rutorrent-1  | [fix-attrs.d] applying ownership & permissions fixes...
rtorrent-rutorrent-1  | [fix-attrs.d] done.
rtorrent-rutorrent-1  | [cont-init.d] executing container initialization scripts...
rtorrent-rutorrent-1  | [cont-init.d] 00-fix-logs.sh: executing...
rtorrent-rutorrent-1  | [cont-init.d] 00-fix-logs.sh: exited 0.
rtorrent-rutorrent-1  | [cont-init.d] 01-fix-uidgid.sh: executing...
rtorrent-rutorrent-1  | [cont-init.d] 01-fix-uidgid.sh: exited 0.
rtorrent-rutorrent-1  | [cont-init.d] 02-fix-perms.sh: executing...
rtorrent-rutorrent-1  | Fixing perms...
rtorrent-rutorrent-1  | [cont-init.d] 02-fix-perms.sh: exited 0.
rtorrent-rutorrent-1  | [cont-init.d] 03-config.sh: executing...
rtorrent-rutorrent-1  | Public IP address enforced to [removed]
rtorrent-rutorrent-1  | Setting timezone to Europe/Amsterdam...
rtorrent-rutorrent-1  | Setting PHP-FPM configuration...
rtorrent-rutorrent-1  | Setting PHP INI configuration...
rtorrent-rutorrent-1  | Setting OpCache configuration...
rtorrent-rutorrent-1  | Setting Nginx configuration...
rtorrent-rutorrent-1  | Setting Nginx XMLRPC over SCGI configuration...
rtorrent-rutorrent-1  | Setting Nginx ruTorrent configuration...
rtorrent-rutorrent-1  | Setting Nginx WebDAV configuration...
rtorrent-rutorrent-1  | Update healthcheck script...
rtorrent-rutorrent-1  | Initializing files and folders...
rtorrent-rutorrent-1  | Checking rTorrent local configuration...
rtorrent-rutorrent-1  | Checking rTorrent configuration...
rtorrent-rutorrent-1  | Bootstrapping ruTorrent configuration...
rtorrent-rutorrent-1  | Setting custom config for create plugin...
rtorrent-rutorrent-1  | Checking ruTorrent custom plugins...
rtorrent-rutorrent-1  |   Copying custom filemanager plugin...
rtorrent-rutorrent-1  |   Copying custom ratiocolor plugin...
rtorrent-rutorrent-1  | Checking ruTorrent plugins configuration...
rtorrent-rutorrent-1  | Checking ruTorrent custom themes...
rtorrent-rutorrent-1  |   Copying custom club-QuickBox theme...
rtorrent-rutorrent-1  | Setting GeoIP2 databases for geoip2 plugin...
rtorrent-rutorrent-1  | Fixing perms...
rtorrent-rutorrent-1  | [cont-init.d] 03-config.sh: exited 0.
rtorrent-rutorrent-1  | [cont-init.d] 04-create-services.sh: executing...
rtorrent-rutorrent-1  | [cont-init.d] 04-create-services.sh: exited 0.
rtorrent-rutorrent-1  | [cont-init.d] ~-socklog: executing...
rtorrent-rutorrent-1  | [cont-init.d] ~-socklog: exited 0.
rtorrent-rutorrent-1  | [cont-init.d] done.
rtorrent-rutorrent-1  | [services.d] starting services
rtorrent-rutorrent-1  | 2024/04/28 13:06:22 [notice] 510#510: using the "epoll" event method
rtorrent-rutorrent-1  | 2024/04/28 13:06:22 [notice] 510#510: nginx/1.24.0
rtorrent-rutorrent-1  | 2024/04/28 13:06:22 [notice] 510#510: OS: Linux 6.1.0-20-amd64
rtorrent-rutorrent-1  | 2024/04/28 13:06:22 [notice] 510#510: getrlimit(RLIMIT_NOFILE): 32000:40000
rtorrent-rutorrent-1  | 2024/04/28 13:06:22 [notice] 510#510: start worker processes
rtorrent-rutorrent-1  | 2024/04/28 13:06:22 [notice] 510#510: start worker process 518
rtorrent-rutorrent-1  | 2024/04/28 13:06:22 [notice] 510#510: start worker process 519
rtorrent-rutorrent-1  | [28-Apr-2024 13:06:22] NOTICE: fpm is running, pid 509
rtorrent-rutorrent-1  | [services.d] done.
rtorrent-rutorrent-1  | [28-Apr-2024 13:06:22] NOTICE: ready to handle connections
rtorrent-rutorrent-1  | rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent-rutorrent-1  | rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent-rutorrent-1  | rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent-rutorrent-1  | rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent-rutorrent-1  | rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
rtorrent-rutorrent-1  | rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.

Additional info

Following another issue reported, I've set RT_SEND_BUFFER_SIZE and RT_RECEIVE_BUFFER_SIZE to 32M in rtorrent-rutorrent.env, but the issue remains.

If I rollback to the previous version, everything is working fine.

@ibyteprettyhard
Copy link

Same error here as well out of nowhere.

@stickz
Copy link
Contributor

stickz commented Apr 28, 2024

@Hipoglos @ibyteprettyhard This was fixed #338. Please pull docker edge for the changes.
docker pull crazymax/rtorrent-rutorrent:edge

@Ixiruss
Copy link

Ixiruss commented Apr 28, 2024

I pulled the edge version 1 hour before but got another error (not related to the value) so I rollbacked to previous version and it's working.
I don't know if I have something wrong from my side with the edge version but once I have time I'll check (hopefully in few hours) on it and if relevant share the result (I think in another post anyway as it's another error).
Thanks for all your actions anyway !

PS : I retrieved old logs generated with the edge.
2024/04/28 13:01:40 [error] 556#556: *58 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined variable $useInternalHybrid in /var/www/rutorrent/plugins/create/init.php on line 16" while reading response header from upstream, client: 172.30.0.1, server: , request: "GET /php/getplugins.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "example.domain.com"

If maybe I'm not alone ?

@ibyteprettyhard
Copy link

ibyteprettyhard commented Apr 28, 2024

@Hipoglos @ibyteprettyhard This was fixed #338. Please pull docker edge for the changes. docker pull crazymax/rtorrent-rutorrent:edge

I pulled the edge version and now I'm getting a different error. Nothing from the console this time, but in the rutorrent log window.

Bad response from server: (404 [error,list]) <html> <head><title>404 Not Found</title></head> <body> <center><h1>404 Not Found</h1></center> <hr><center>nginx</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page -->

@stickz
Copy link
Contributor

stickz commented Apr 28, 2024

@Ixiruss Please check the ruTorrent v4.3.0 installation. It did not install properly. This variable is not found.
https://github.com/Novik/ruTorrent/blob/253da04e3900171a0cd5807f943d3ad4791c9cb7/plugins/create/conf.php#L19

Check: cat /var/www/rutorrent/plugins/create/conf.php
If missing add: $useInternalHybrid = true; with nano /var/www/rutorrent/plugins/create/conf.php.

If it's not missing let me know. It's probably a caching issue.

@Hipoglos
Copy link
Author

Thanks @stickz. Edge is working for me now. Have a nice weekend!

@andrewladlow
Copy link

I pulled the edge version and now I'm getting a different error. Nothing from the console this time, but in the rutorrent log window.

I was getting a similar error, check if you still have:

RU_REMOVE_CORE_PLUGINS=httprpc

defined in your yml or .env (in my case), it was triggering a request to /RPC2 when loading the UI which was then 404ing

@ibyteprettyhard
Copy link

I pulled the edge version and now I'm getting a different error. Nothing from the console this time, but in the rutorrent log window.

I was getting a similar error, check if you still have:

RU_REMOVE_CORE_PLUGINS=httprpc

defined in your yml or .env (in my case), it was triggering a request to /RPC2 when loading the UI which was then 404ing

Removed entry in my .env, error persists after down/up

@ibyteprettyhard
Copy link

I pulled the edge version and now I'm getting a different error. Nothing from the console this time, but in the rutorrent log window.

I was getting a similar error, check if you still have:

RU_REMOVE_CORE_PLUGINS=httprpc

defined in your yml or .env (in my case), it was triggering a request to /RPC2 when loading the UI which was then 404ing

Removed entry in my .env, error persists after down/up

edit: Actually, this fixed the 404 error. However it broke my sonarr/radarr integrations and it only works via direct ip:port and not through my reverse proxy.

@stickz
Copy link
Contributor

stickz commented Apr 28, 2024

@ibyteprettyhard You need to point sonarr/radarr to httprpc. Change your url path to /rutorrent/plugins/httprpc/action.php

@Hipoglos
Copy link
Author

crazymax/rtorrent-rutorrent:edge solved the issue

@newadventure079
Copy link

I'm on edge and I see

2024-04-28T21:28:55.791625271Z 2024/04/28 15:28:55 [error] 581#581: *3 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined variable $useInternalHybrid in /var/www/rutorrent/plugins/create/init.php on line 16" while reading response header from upstream, client: 172.20.0.1, server: , request: "GET /php/getplugins.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "192.168.1.110:9081", referrer: "http://192.168.1.110:9081/"

My /var/www/rutorrent/plugins/create/conf.php file doesn't have $useInternalHybrid = true;

cat /var/www/rutorrent/plugins/create/conf.php
<?php

$useExternal = 'mktorrent';
$pathToCreatetorrent = '/usr/local/bin/mktorrent';
$recentTrackersMaxCount = 15;

Did my rutorrent installation get messed up or cached?

@stickz
Copy link
Contributor

stickz commented Apr 28, 2024

@newadventure079 @Ixiruss once #341 is merged, pull edge again. This docker image overrides that file and needs updated.

@Ixiruss
Copy link

Ixiruss commented Apr 28, 2024

@newadventure079 @Ixiruss once #341 is merged, pull edge again. This docker image overrides that file and needs updated.

Thank you for your help !

@johnmaguire
Copy link

johnmaguire commented Apr 29, 2024

I ran into this issue yesterday. Around 9am, I switched to edge. I then ran into this error: #339 (comment)

This morning, I pulled edge again. Now the UI works, but all of my data files are gone. Cool.

EDIT: False alarm. I'm not sure what happened, as my system didn't reboot, but my ZFS dataset for the Downloads directory was no longer mounted. I manually remounted it and everything is fine. No idea how that happened...

@rogales
Copy link

rogales commented Apr 29, 2024

crazymax/rtorrent-rutorrent:edge solved the issue

would you help me?

@johnmaguire
Copy link

johnmaguire commented Apr 29, 2024

@rogales In your docker-compose.yml update the line that says image: crazymax/rtorrent-rutorrent:latest to image: crazymax/rtorrent-rutorrent:edge.

Then open your env file (probably rtorrent-rutorrent.env) and remove the following line:

RU_REMOVE_CORE_PLUGINS=httprpc

Once the fix is released in an official version, you may want to change edge (i.e. "beta") back to latest (i.e. "stable").

@rogales
Copy link

rogales commented Apr 29, 2024

thank You!

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

8 participants