crazy-max / docker-rtorrent-rutorrent

rTorrent and ruTorrent Docker image
MIT License
483 stars 107 forks source link

XMLRPC - Unable to connect to sonarr/radarr #174

Closed Gudui closed 1 year ago

Gudui commented 2 years ago

Support guidelines

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

Description

I'm trying to setup a servere where the torrent client would be this r/rutorrent image tied together with sonarr and radarr. However I have no luck getting a connection to rtorrent from sonarr. My .env variables is the following:

RT_DHT_PORT=6881 XMLRPC_PORT=8005 RUTORRENT_PORT=8081 WEBDAV_PORT=9001 RT_INC_PORT=55000

Connection string from sonarr is: image

Rutorrent is working fine, and if i try the Rutorrent port (8081), then i can see the in the logs that it hits the server, so the host is correct.

What am I missing here?

Expected behaviour

Id expect that i can connect to sonarr through RPC2. I have not setup any AUTH in the passwd files.

Actual behaviour

Not connecting to rtorrent through RPC2

Steps to reproduce

  1. Install docker sonarr and docker-rtorrent-rutorrent
  2. Try to connect the to using the setup ports

Docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.8.2)
  compose: Docker Compose (Docker Inc., v2.4.1)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 4
  Running: 4
  Paused: 0
  Stopped: 0
 Images: 13
 Server Version: 20.10.14
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 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.runtime.v1.linux runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3df54a852345ae127d1fa3092b95168e4a88e2f8
 runc version: v1.0.3-0-gf46b6ba
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.16.3-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 4.818GiB
 Name: docker-desktop
 ID: WACZ:JABX:2YGV:LJ2Y:6ZMZ:CYME:QV5X:3BBS:LQQ6:KHO3:67LU:ARLY
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false

Version

Docker compose

version: "3.2"

services:
  rtorrent-rutorrent:
    image: crazymax/rtorrent-rutorrent:latest
    expose:
      - "${RT_DHT_PORT}/udp"
      - "${XMLRPC_PORT}"
      - "${RUTORRENT_PORT}"
      - "${WEBDAV_PORT}"
      - "${RT_INC_PORT}"
    ports:
      - target: ${RT_DHT_PORT}
        published: ${RT_DHT_PORT}
        protocol: udp
      - target: ${RUTORRENT_PORT}
        published: ${RUTORRENT_PORT}
        protocol: tcp
      - target: ${WEBDAV_PORT}
        published: ${WEBDAV_PORT}
        protocol: tcp
      - target: ${RT_INC_PORT}
        published: ${RT_INC_PORT}
        protocol: tcp
    env_file:
      - "rtorrent-rutorrent.env"
      - ".env"
    volumes:
      - "c:\\Configs\\Docker\\rutorrent\\config:/data"
      - "e:\\downloads:/downloads"
      - "c:\\Configs\\Docker\\rutorrent\\passwd:/passwd"
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000
    restart: always

  #rtorrent-logs:
  #  image: bash
  #  command: bash -c 'tail -f /log/*.log'
  #  depends_on:
  #    - rtorrent-rutorrent
  #  volumes:
  #    - "c:\\Configs\\Docker\\rutorrent\\log:/log"
  #  restart: always

Container logs

1653285874 N rtorrent main: Starting thread. 1653285874 N rtorrent scgi: Starting thread.

Not sure where to find them unfortunately.

Additional info

No response

desg commented 2 years ago

if you haven't figured out already use "/plugins/rpc/rpc.php" instead of RPC2 as stated below

killmaster commented 2 years ago

Having the same problem here.

Only way to get it working is to make a bridge network between the two containers, but that makes it so rtorrent can't times out when contacting trackers.

When accessing the RPC2 url at /plugins/rpc/rpc.php I get the error Link to XMLRPC failed. May be, rTorrent is down?.

Solved it changing the network_mode on sonarr to host.

smeusekentik commented 2 years ago

I just noticed that by default the docker-compose file doesn't actually expose the XMLRPC port, I had to add that manually.

      - target: ${XMLRPC_PORT}
        published: ${XMLRPC_PORT}
        protocol: tcp
bradiosd commented 1 year ago

I just noticed that by default the docker-compose file doesn't actually expose the XMLRPC port, I had to add that manually.

      - target: ${XMLRPC_PORT}
        published: ${XMLRPC_PORT}
        protocol: tcp

Good catch! Been struggling on this for over an hour. Will create a PR for this soon.