crazy-max / docker-rtorrent-rutorrent

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

XMLRPC Gateway Timeout #125

Closed amidsthecode closed 2 years ago

amidsthecode commented 2 years ago

Docker container reports unhealthy under an hour of starting the container. Also closes off all network connections to any other running docker container. Container does not appear to stop when using docker ps -a even after a SIGHUP until a full restart. I have no idea on how to reproduce this on a different hardware.

pi@raspberrypi:~ $ sudo docker-compose down
Stopping crazymax-rt  ...
Stopping wireguard-cm ... error

ERROR: for crazymax-rt  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=70)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60)

Response of health check scripts:

bash-5.1# curl -Ssd "<?xml version='1.0'?><methodCall><methodName>system.api_version</methodName></methodCall>" http://127.0.0.1:8001
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
bash-5.1# curl -Ss http://127.0.0.1:10000/ping
pong
bash-5.1# curl -Ss http://127.0.0.1:9001
<html>
<head><title>Index of /</title></head>
<body>
<h1>Index of /</h1><hr><pre><a href="../">../</a>
</pre><hr></body>
</html>

Docker info


Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

Server:
 Containers: 7
  Running: 5
  Paused: 0
  Stopped: 2
 Images: 16
 Server Version: 20.10.7
 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.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7eba5930496d9bbe375fdf71603e610ad737d2b2
 runc version: v1.0.0-0-g84113ee
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.17-v7l+
 Operating System: Raspbian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: armv7l
 CPUs: 4
 Total Memory: 1.823GiB
 Name: raspberrypi
 ID: URLB:7G5K:Q4CS:FFAA:IHMU:WRB5:GKG4:IMGR:5XLQ:37NI:6Y2J:62K5
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

RT_DHT_PORT=6881 XMLRPC_PORT=8000 RUTORRENT_PORT=9999 WEBDAV_PORT=9000 RT_INC_PORT=56271

Compose file

version: "3.7"

services:
  rutorrent-cm:
    image: crazymax/rtorrent-rutorrent
    container_name: crazymax-rt
    env_file:
      - "rtorrent-rutorrent.env"
      - ".env"
    volumes:
      - "./data:/data"
      - "./downloads:/downloads"
      - "./passwd:/passwd"
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000
    network_mode: "service:vpn-cm"
    depends_on:
      - vpn-cm

  vpn-cm:
    image: ghcr.io/linuxserver/wireguard:arm32v7-latest
    container_name: wireguard-cm
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    volumes:
      - "./wireguard/:/config"
      - "/lib/modules:/lib/modules"
      - "./expose/cookie/:/home/docker/expose/cookie/"
    dns:
      - 9.9.9.9
    environment:
      - PUID=1000
      - PGID=1000
    env_file:
      - ".env"    
    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
    healthcheck:
      test: ["CMD-SHELL", "if [ $$(curl --silent https://ifconfig.co/country-iso) = 'GB' ]; then exit 0; else exit 1; f$      start_period: 10s
      interval: 60s
      timeout: 10s
      retries: 3
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=0

Version info:


docker-rtorrent-rutorrent: 3.10-0.9.8-0.13.8-r17
Linux raspberrypi 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux
docker-compose version 1.29.2, build 5becea4c
amidsthecode commented 2 years ago

The culprit was a corrupt torrent file, once that was removed, things started working without issue again.