crazy-max / docker-rtorrent-rutorrent

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

Healthcheck always unhealthy due to WebDAV #162

Closed DennisGaida closed 1 year ago

DennisGaida commented 2 years ago

There is also the old issue here: https://github.com/crazy-max/docker-rtorrent-rutorrent/issues/68 and it looks to be about the same thing though no solution besides building the container anew.

I checked the healthcheck script from within the container and the culprit is WebDAV (the other endpoints, e.g. /ping have no problems):

/ # curl http://127.0.0.1:9001
<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

My docker-compose is pretty simple for testing purposes:

  rtorrent:
    image: crazymax/rtorrent-rutorrent:latest
    container_name: rtorrent
    network_mode: service:gluetun
    stop_grace_period: 20s
    volumes:
      - "$DOCKERDIR/rtorrent:/data"
      - "$DOCKERDIR/rtorrent/passwd:/passwd"
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000

I also checked everything I can check from /tpls/etc/nginx/conf.d/webdav.conf, i.e. /downloads/complete is accessible, /passwd/webdav.htpasspwd exists and is accessible. I then went ahead and replaced the webdav.conf to get some logging, and this is what I get:

127.0.0.1 - - [04/May/2022:14:07:09 +0200] "GET / HTTP/1.1" 403 146 "-" "curl/7.78.0"
127.0.0.1 - - [04/May/2022:14:07:32 +0200] "GET / HTTP/1.1" 403 146 "-" "curl/7.78.0"
2022/05/04 14:07:32 [error] 565#565: *54 "/downloads/complete/index.html" is forbidden (13: Permission denied), client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "127.0.0.1:9001"

When I disable the WebDAV healthcheck manually the container returns healthy.

aka95 commented 1 year ago

EDIT: Fixed my issue. Turned it out I mixed up PUID and PGID...