qdm12 / gluetun-wiki

Home to the Markdown Wiki page for Gluetun
MIT License
269 stars 31 forks source link

Gluetun in infinite crash loop after automatic update by watchtower #58

Closed Orbocom closed 3 months ago

Orbocom commented 3 months ago

Hello,

Gluetun has been running perfectly for several months on my TS-364 QNAP (32GB RAM, 2x4TB in raid1, firmware 5.1.5 20240219), using wireguard by NORDVPN and shadowsocks. On 19-03-24 watchtower updated the gluetun docker container. Following, the container entered an infinite loop of starts and crashes.

The log report:

Running version latest built on 2024-03-18T17:49:37.003Z (commit 3d16798) šŸ”§ Need help? https://github.com/qdm12/gluetun/discussions/new šŸ› Bug? https://github.com/qdm12/gluetun/issues/new āœØ New feature? https://github.com/qdm12/gluetun/issues/new ā˜• Discussion? https://github.com/qdm12/gluetun/discussions/new šŸ’» Email? quentin.mcgaw@gmail.com šŸ’° Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12 2024-03-19T11:37:33+01:00 INFO [routing] default route found: interface eth0, gateway 172.29.0.1, assigned IP 172.29.0.4 and family v4 2024-03-19T11:37:33+01:00 INFO [routing] local ethernet link found: eth0 2024-03-19T11:37:33+01:00 INFO [routing] local ipnet found: 172.29.0.0/22 2024-03-19T11:37:33+01:00 INFO [firewall] enabling... 2024-03-19T11:37:33+01:00 INFO [firewall] enabled successfully 2024-03-19T11:37:34+01:00 INFO [storage] merging by most recent 17820 hardcoded servers and 17820 servers read from /gluetun/servers.json panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x760835] goroutine 35 [running]: github.com/qdm12/gluetun/internal/configuration/settings.(ServerSelection).validate(0xc0004cd130, {0xc00002c015, 0x7}, {0x1098740?, 0xc0024517a0?}) github.com/qdm12/gluetun/internal/configuration/settings/serverselection.go:149 +0xa55 github.com/qdm12/gluetun/internal/configuration/settings.(Provider).validate(0xc0004cd128, {0xc00002a021?, 0x9?}, {0x1098740, 0xc0024517a0}) github.com/qdm12/gluetun/internal/configuration/settings/provider.go:47 +0x2fc github.com/qdm12/gluetun/internal/configuration/settings.(VPN).Validate(0xc0004cd118, {0x1098740, 0xc0024517a0}, 0x0?) github.com/qdm12/gluetun/internal/configuration/settings/vpn.go:30 +0x165 github.com/qdm12/gluetun/internal/configuration/settings.(Settings).Validate.func1() github.com/qdm12/gluetun/internal/configuration/settings/settings.go:52 +0x2b github.com/qdm12/gluetun/internal/configuration/settings.(*Settings).Validate(0xc0004cce00, {0x1098740?, 0xc0024517a0}, 0x0) github.com/qdm12/gluetun/internal/configuration/settings/settings.go:57 +0x9cd main._main({0x109d840, 0xc0004c2000}, {{0x1096954, 0x6}, {0x1096cd8, 0x7}, {0x1098470, 0x18}}, {0xc0000220a0, 0x1, ...}, ...) ./main.go:240 +0xf9d main.main.func1() ./main.go:92 +0x12c created by main.main in goroutine 1 ./main.go:91 +0x5e5

When creating the containers manually using "docker compose up -d", resulted in following error:

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to create new parent process: namespace path: lstat /proc/10977/ns/net: no such file or directory: unknown

I've used following docker compose file:

services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun     
    ports:
      - 8186:8080 # gluetun
      - 8888:8888/tcp
      - 8388:8388/tcp
      - 8388:8388/udp
      - 9091:9091 # transmission-vpn
      - 51413:51413
      - 51413:51413/udp
      - 5800:5800 # jdownloader-vpn
      - 3129:3129
      - 8181:8080 # sabnzbd-vpn
    volumes:
      - /share/CACHEDEV1_DATA/appdata/gluetun:/gluetun
    environment:
      - SHADOWSOCKS=on
      - SHADOWSOCKS_PASSWORD=xxxxxxxxxxxxxxxxx
      - VPN_SERVICE_PROVIDER=nordvpn
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      - SERVER_COUNTRIES=Netherlands,Belgium,Germany
      - SERVER_REGION=Europe
      - TZ=Europe/Amsterdam
    restart: unless-stopped

  transmission:
    image: ghcr.io/linuxserver/transmission:latest
    container_name: transmission-vpn
    network_mode: "service:gluetun"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
      - USER=xxxxx
      - PASS=xxxxxxxxxxx
    volumes:
      - /share/CACHEDEV1_DATA/appdata/transmission:/config
      - /share/CACHEDEV1_DATA/Download/completed:/downloads
    restart: unless-stopped

  jdownloader-2-vpn:
    image: jlesage/jdownloader-2:latest
    container_name: jdownloader-2-vpn
    network_mode: "service:gluetun"
    environment:
      - MYJDOWNLOADER_EMAIL=xxxxxxxxxxxxxxxxxxxx
      - MYJDOWNLOADER_PASSWORDxxxxxxxxxxxxxxxxxxxxx
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
    volumes:
      - "/share/CACHEDEV1_DATA/appdata/jdownloader-2-vpn:/config:rw"
      - "/share/CACHEDEV1_DATA/Download/completed:/output:rw"
    restart: unless-stopped   

  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd:latest
    container_name: sabnzbd-vpn
    network_mode: "service:gluetun"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
    volumes:
      - /share/CACHEDEV1_DATA/appdata/sabnzbd/config:/config
      - /share/CACHEDEV1_DATA/Download/completed:/downloads #optional
      - /share/CACHEDEV1_DATA/Download/incomplete:/incomplete-downloads #optional
    restart: unless-stopped

What to do to resolve the issue?

Orbocom commented 3 months ago

Hello, I have applied the solution suggested by @Elliotks link

This worked for me.

alexkahler commented 3 months ago

Same here. Downgrading to v3 is a temporary fix. Latest commit pushed yesterday (March 18th) seems to have broken something.

alexkahler commented 3 months ago

@Orbocom - you might want to open this issue in https://github.com/qdm12/gluetun instead of the wiki.

PS: The issue seems to have been fixed in the latest commit pushed an hour ago. Try to pull the latest image from docker hub.

Orbocom commented 3 months ago

@Orbocom - you might want to open this issue in https://github.com/qdm12/gluetun instead of the wiki.

PS: The issue seems to have been fixed in the latest commit pushed an hour ago. Try to pull the latest image from docker hub.

Thank you for your advice. You are absolutely right. My apologies.

alexkahler commented 3 months ago

Thank you for your advice. You are absolutely right. My apologies.

Great. Please close the ticket if the issue has been fixed for you :)

Orbocom commented 3 months ago

Thanks for prompt response