linuxserver / docker-transmission

GNU General Public License v3.0
577 stars 179 forks source link

Transmission exits due to s6-overlay timeout resulting in SIGKILL #261

Closed vivami closed 9 months ago

vivami commented 10 months ago

Is there an existing issue for this?

Current Behavior

My system boots up every morning. Very frequently, the transmission container fails to get into a healthy state and exits due to s6-supervise svc-transmission: warning: finish script lifetime reached maximum value - sending it a SIGKILL. Any ideas as to why the finish script doesn't finish? How do I debug this issue? Why is the container not getting restarted by the unless-stopped restart policy?

Expected Behavior

No response

Steps To Reproduce

  1. Refer to below docker-compose.yml snippet of transmission
  2. Containers get started by docker daemon upon system start up
  3. Transmission exists after a few mins and doesn't recover
  4. Restarting the transmission container manually brings transmission to normal operations again, until the next system startup
  5. gluetun and traefik have fairly normal config

Environment

- OS: Ubuntu 22.04
- How docker service was installed: distro's package manager
- Using docker-compose to start

CPU architecture

x86-64

Docker creation

`sudo docker-compose up -d`

    transmission:
      image: linuxserver/transmission:latest
      container_name: transmission
      healthcheck:
        test: curl --connect-timeout 15 --fail -u transmission:$(cat /run/secrets/transmission_password) http://127.0.0.1:9091/transmission/web/ || exit 1
        interval: 1m30s
        retries: 2
        timeout: 20s
        start_period: 45s
        start_interval: 1s
      restart: unless-stopped
      network_mode: service:gluetun
      security_opt:
       - no-new-privileges:true
      environment:
        - PUID=65534
        - PGID=65534
        - TZ='Europe/Amsterdam'
        - USER=transmission
        - FILE__PASS=/run/secrets/transmission_password
      #  - TRANSMISSION_WEB_HOME=/flood-for-transmission/ #optional
      volumes:
        - './transmission/config:/config'
        - '/anr-downloads:/downloads'
        - '/anr-downloads/torrents:/watch'
      labels:
       - "traefik.http.routers.transmission.rule=Host(`transmission.local.example.com`)"
       - "traefik.http.services.transmission.loadbalancer.server.port=9091"
       - "traefik.http.middlewares.admin-ipwhitelist.ipwhitelist.sourcerange=10.0.42.0/24, 10.0.40.0/24, 10.8.0.0/24, 172.0.0.0/8"
       - "traefik.http.routers.transmission.middlewares=admin-ipwhitelist"
       - "traefik.http.routers.transmission-secure.middlewares=admin-ipwhitelist"
       - "com.centurylinklabs.watchtower.enable=true"
       - "autoheal=true"
      secrets:
        - transmission_password
      depends_on:
        traefik:
          condition: service_started
        gluetun:
          condition: service_healthy

### Container logs

```bash
[migrations] started
[migrations] no migrations found
[env-init] PASS set from FILE__PASS
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    65534
User GID:    65534
───────────────────────────────────────
[custom-init] No custom files found, skipping...
[2023-10-27 08:47:46.325] web.cc:175: Will verify tracker certs using envvar CURL_CA_BUNDLE: none
[2023-10-27 08:47:46.325] web.cc:176: NB: this only works if you built against libcurl with openssl or gnutls, NOT nss
[2023-10-27 08:47:46.325] web.cc:177: NB: Invalid certs will appear as 'Could not connect to tracker' like many other errors
[2023-10-27 08:47:46.326] rpc-server.cc:763: Added '127.0.0.1' to host whitelist
[2023-10-27 08:47:46.326] rpc-server.cc:763: Added '::1' to host whitelist
[2023-10-27 08:47:46.326] rpc-server.cc:923: Serving RPC and Web requests from '/usr/share/transmission/public_html'
Connection to localhost (127.0.0.1) 9091 port [tcp/*] succeeded!
[ls.io-init] done.
[2023-10-27 08:47:47.435] inf session.cc:646 Transmission version 4.0.4 (24077e3511) starting (session.cc:646)
[2023-10-27 08:47:47.435] inf session.cc:405 Listening to incoming peer connections on [0.0.0.0]:51413 (session.cc:405)
[2023-10-27 08:47:47.435] inf session.cc:405 Listening to incoming peer connections on [::]:51413 (session.cc:405)
[2023-10-27 08:47:47.435] inf port-forwarding.cc:218 State changed from 'Not forwarded' to 'Starting' (port-forwarding.cc:218)
[2023-10-27 08:47:47.435] inf tr-udp.cc:168 Bound UDP IPv4 address [0.0.0.0]:51413 (tr-udp.cc:168)
[2023-10-27 08:47:47.435] inf tr-udp.cc:202 Bound UDP IPv6 address [::]:51413 (tr-udp.cc:202)
[2023-10-27 08:47:47.435] inf rpc-server.cc:907 Serving RPC and Web requests on 0.0.0.0:9091/transmission/ (rpc-server.cc:907)
[2023-10-27 08:47:47.435] inf rpc-server.cc:713 Listening for RPC and Web requests on '0.0.0.0:9091' (rpc-server.cc:713)
[2023-10-27 08:47:47.435] inf rpc-server.cc:917 Password required (rpc-server.cc:917)
[2023-10-27 08:47:47.435] inf rpc-server.cc:923 Serving RPC and Web requests from '/usr/share/transmission/public_html' (rpc-server.cc:923)
[2023-10-27 08:47:47.435] inf daemon.cc:715 Loading settings from '/config' (daemon.cc:715)
[2023-10-27 08:47:47.435] inf daemon.cc:751 Requiring authentication (daemon.cc:751)
[2023-10-27 08:47:47.435] inf daemon.cc:772 Watching '/watch' for new torrent files (daemon.cc:772)

s6-supervise svc-transmission: warning: finish script lifetime reached maximum value - sending it a SIGKILL
github-actions[bot] commented 10 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

vivami commented 9 months ago

Removing network_mode: service:gluetun and rebooting 6+ times did not result in this issue again, so most likely this issue is not in transmission, but in gluetun's connectivity. Closing this issue.

zwimer commented 3 months ago

I have this issue as well, without gluetun.

Dim3333 commented 2 months ago

I have this issue too without gluetun.

zwimer commented 2 months ago

It might be related to this: https://github.com/docker/compose/issues/11872