qdm12 / gluetun

VPN client in a thin Docker container for multiple VPN providers, written in Go, and using OpenVPN or Wireguard, DNS over TLS, with a few proxy servers built-in.

Home Page:https://hub.docker.com/r/qmcgaw/gluetun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Container shuts down as soon as I disconnect from SSH

NicoTF opened this issue Β· comments

Is this urgent?

No

Host OS

Debian Bookworm

CPU arch

x86_64

VPN service provider

NordVPN

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2024-05-18T18:08:57.405Z (commit 4218dba)

What's the problem πŸ€”

The container keeps shutting down minutes after i disconnect from SSH with message "Caught OS signal terminated, shutting down."
To start it i use the command docker compose up -d and gluetun is the only container that behave like that

Share your logs (at least 10 lines)

gluetun  | Running version latest built on 2024-05-18T18:08:57.405Z (commit 4218dba)
gluetun  |
gluetun  | πŸ”§ Need help? https://github.com/qdm12/gluetun/discussions/new
gluetun  | πŸ› Bug? https://github.com/qdm12/gluetun/issues/new
gluetun  | ✨ New feature? https://github.com/qdm12/gluetun/issues/new
gluetun  | β˜• Discussion? https://github.com/qdm12/gluetun/discussions/new
gluetun  | πŸ’» Email? quentin.mcgaw@gmail.com
gluetun  | πŸ’° Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
gluetun  | 2024-05-19T09:05:08Z INFO [routing] default route found: interface eth0, gateway 172.21.0.1, assigned IP 172.21.0.2 and family v4
gluetun  | 2024-05-19T09:05:08Z INFO [routing] local ethernet link found: eth0
gluetun  | 2024-05-19T09:05:08Z INFO [routing] local ipnet found: 172.21.0.0/16
gluetun  | 2024-05-19T09:05:09Z INFO [firewall] enabling...
gluetun  | 2024-05-19T09:05:09Z INFO [firewall] enabled successfully
gluetun  | 2024-05-19T09:05:09Z INFO [storage] creating /gluetun/servers.json with 19425 hardcoded servers
gluetun  | 2024-05-19T09:05:09Z INFO Alpine version: 3.19.1
gluetun  | 2024-05-19T09:05:09Z INFO OpenVPN 2.5 version: 2.5.8
gluetun  | 2024-05-19T09:05:09Z INFO OpenVPN 2.6 version: 2.6.8
gluetun  | 2024-05-19T09:05:09Z INFO Unbound version: 1.20.0
gluetun  | 2024-05-19T09:05:09Z INFO IPtables version: v1.8.10
gluetun  | 2024-05-19T09:05:09Z INFO Settings summary:
gluetun  | β”œβ”€β”€ VPN settings:
gluetun  | |   β”œβ”€β”€ VPN provider settings:
gluetun  | |   |   β”œβ”€β”€ Name: nordvpn
gluetun  | |   |   └── Server selection settings:
gluetun  | |   |       β”œβ”€β”€ VPN type: openvpn
gluetun  | |   |       β”œβ”€β”€ Countries: Poland
gluetun  | |   |       └── OpenVPN server selection settings:
gluetun  | |   |           └── Protocol: UDP
gluetun  | |   └── OpenVPN settings:
gluetun  | |       β”œβ”€β”€ OpenVPN version: 2.6
gluetun  | |       β”œβ”€β”€ User: [set]
gluetun  | |       β”œβ”€β”€ Password: [set]
gluetun  | |       β”œβ”€β”€ Network interface: tun0
gluetun  | |       β”œβ”€β”€ Run OpenVPN as: root
gluetun  | |       └── Verbosity level: 1
gluetun  | β”œβ”€β”€ DNS settings:
gluetun  | |   β”œβ”€β”€ Keep existing nameserver(s): no
gluetun  | |   β”œβ”€β”€ DNS server address to use: 127.0.0.1
gluetun  | |   └── DNS over TLS settings:
gluetun  | |       β”œβ”€β”€ Enabled: yes
gluetun  | |       β”œβ”€β”€ Update period: every 24h0m0s
gluetun  | |       β”œβ”€β”€ Unbound settings:
gluetun  | |       |   β”œβ”€β”€ Authoritative servers:
gluetun  | |       |   |   └── cloudflare
gluetun  | |       |   β”œβ”€β”€ Caching: yes
gluetun  | |       |   β”œβ”€β”€ IPv6: no
gluetun  | |       |   β”œβ”€β”€ Verbosity level: 1
gluetun  | |       |   β”œβ”€β”€ Verbosity details level: 0
gluetun  | |       |   β”œβ”€β”€ Validation log level: 0
gluetun  | |       |   β”œβ”€β”€ System user: root
gluetun  | |       |   └── Allowed networks:
gluetun  | |       |       β”œβ”€β”€ 0.0.0.0/0
gluetun  | |       |       └── ::/0
gluetun  | |       └── DNS filtering settings:
gluetun  | |           β”œβ”€β”€ Block malicious: yes
gluetun  | |           β”œβ”€β”€ Block ads: no
gluetun  | |           β”œβ”€β”€ Block surveillance: no
gluetun  | |           └── Blocked IP networks:
gluetun  | |               β”œβ”€β”€ 127.0.0.1/8
gluetun  | |               β”œβ”€β”€ 10.0.0.0/8
gluetun  | |               β”œβ”€β”€ 172.16.0.0/12
gluetun  | |               β”œβ”€β”€ 192.168.0.0/16
gluetun  | |               β”œβ”€β”€ 169.254.0.0/16
gluetun  | |               β”œβ”€β”€ ::1/128
gluetun  | |               β”œβ”€β”€ fc00::/7
gluetun  | |               β”œβ”€β”€ fe80::/10
gluetun  | |               β”œβ”€β”€ ::ffff:127.0.0.1/104
gluetun  | |               β”œβ”€β”€ ::ffff:10.0.0.0/104
gluetun  | |               β”œβ”€β”€ ::ffff:169.254.0.0/112
gluetun  | |               β”œβ”€β”€ ::ffff:172.16.0.0/108
gluetun  | |               └── ::ffff:192.168.0.0/112
gluetun  | β”œβ”€β”€ Firewall settings:
gluetun  | |   └── Enabled: yes
gluetun  | β”œβ”€β”€ Log settings:
gluetun  | |   └── Log level: info
gluetun  | β”œβ”€β”€ Health settings:
gluetun  | |   β”œβ”€β”€ Server listening address: 127.0.0.1:9999
gluetun  | |   β”œβ”€β”€ Target address: cloudflare.com:443
gluetun  | |   β”œβ”€β”€ Duration to wait after success: 5s
gluetun  | |   β”œβ”€β”€ Read header timeout: 100ms
gluetun  | |   β”œβ”€β”€ Read timeout: 500ms
gluetun  | |   └── VPN wait durations:
gluetun  | |       β”œβ”€β”€ Initial duration: 6s
gluetun  | |       └── Additional duration: 5s
gluetun  | β”œβ”€β”€ Shadowsocks server settings:
gluetun  | |   └── Enabled: no
gluetun  | β”œβ”€β”€ HTTP proxy settings:
gluetun  | |   └── Enabled: no
gluetun  | β”œβ”€β”€ Control server settings:
gluetun  | |   β”œβ”€β”€ Listening address: :8000
gluetun  | |   └── Logging: yes
gluetun  | β”œβ”€β”€ OS Alpine settings:
gluetun  | |   β”œβ”€β”€ Process UID: 1000
gluetun  | |   └── Process GID: 1000
gluetun  | β”œβ”€β”€ Public IP settings:
gluetun  | |   β”œβ”€β”€ Fetching: every 12h0m0s
gluetun  | |   β”œβ”€β”€ IP file path: /tmp/gluetun/ip
gluetun  | |   └── Public IP data API: ipinfo
gluetun  | └── Version settings:
gluetun  |     └── Enabled: yes
gluetun  | 2024-05-19T09:05:09Z INFO [routing] default route found: interface eth0, gateway 172.21.0.1, assigned IP 172.21.0.2 and family v4
gluetun  | 2024-05-19T09:05:09Z INFO [routing] adding route for 0.0.0.0/0
gluetun  | 2024-05-19T09:05:09Z INFO [firewall] setting allowed subnets...
gluetun  | 2024-05-19T09:05:09Z INFO [routing] default route found: interface eth0, gateway 172.21.0.1, assigned IP 172.21.0.2 and family v4
gluetun  | 2024-05-19T09:05:09Z INFO [dns] using plaintext DNS at address 1.1.1.1
gluetun  | 2024-05-19T09:05:09Z INFO [http server] http server listening on [::]:8000
gluetun  | 2024-05-19T09:05:09Z INFO [healthcheck] listening on 127.0.0.1:9999
gluetun  | 2024-05-19T09:05:09Z INFO [firewall] allowing VPN connection...
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] OpenVPN 2.6.8 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] TCP/UDP: Preserving recently used remote address: [AF_INET]82.180.151.61:1194
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] UDPv4 link local: (not bound)
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] UDPv4 link remote: [AF_INET]82.180.151.61:1194
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] [pl218.nordvpn.com] Peer Connection Initiated with [AF_INET]82.180.151.61:1194
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] TUN/TAP device tun0 opened
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] /sbin/ip link set dev tun0 up mtu 1500
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] /sbin/ip link set dev tun0 up
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] /sbin/ip addr add dev tun0 10.100.0.2/24
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] UID set to nonrootuser
gluetun  | 2024-05-19T09:05:09Z INFO [openvpn] Initialization Sequence Completed
gluetun  | 2024-05-19T09:05:09Z INFO [dns] downloading DNS over TLS cryptographic files
gluetun  | 2024-05-19T09:05:09Z INFO [healthcheck] healthy!
gluetun  | 2024-05-19T09:05:11Z INFO [dns] downloading hostnames and IP block lists
gluetun  | 2024-05-19T09:05:14Z INFO [dns] init module 0: validator
gluetun  | 2024-05-19T09:05:14Z INFO [dns] init module 1: iterator
gluetun  | 2024-05-19T09:05:14Z INFO [dns] start of service (unbound 1.20.0).
gluetun  | 2024-05-19T09:05:14Z INFO [dns] generate keytag query _ta-4a5c-4f66. NULL IN
gluetun  | 2024-05-19T09:05:14Z INFO [dns] generate keytag query _ta-4a5c-4f66. NULL IN
gluetun  | 2024-05-19T09:05:15Z INFO [dns] ready
gluetun  | 2024-05-19T09:05:15Z INFO [ip getter] Public IP address is 193.42.99.168 (Poland, Mazovia, Warsaw)
gluetun  | 2024-05-19T09:05:16Z INFO [vpn] You are running on the bleeding edge of latest!
gluetun  |
gluetun  | 2024-05-19T09:30:33Z WARN Caught OS signal terminated, shutting down
gluetun  | 2024-05-19T09:30:33Z INFO dns ticker: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO updater ticker: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO http server: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO control: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO updater: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO tickers: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO HTTP health server: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO vpn: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO shadowsocks proxy: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO http proxy: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO unbound: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO other: terminated βœ”οΈ
gluetun  | 2024-05-19T09:30:33Z INFO [routing] routing cleanup...
gluetun  | 2024-05-19T09:30:34Z INFO [routing] default route found: interface eth0, gateway 172.21.0.1, assigned IP 172.21.0.2 and family v4
gluetun  | 2024-05-19T09:30:34Z INFO [routing] deleting route for 0.0.0.0/0
gluetun  | 2024-05-19T09:30:34Z INFO Shutdown successful

Share your configuration

services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 8888:8888/tcp # HTTP proxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
      - 50026:50026/tcp # Transmission webgui
    environment:
      - VPN_SERVICE_PROVIDER=nordvpn
      - VPN_TYPE=openvpn
      - OPENVPN_USER=${VPN_USER}
      - OPENVPN_PASSWORD=${VPN_PASSWORD}
      - SERVER_COUNTRIES=Poland
    restart: unless-stopped

@qdm12 is more or less the only maintainer of this project and works on it in his free time.
Please:

Something kills with the signal terminated the gluetun container. This can be because you're out of memory, or maybe have something to restart unhealthy containers etc. I cannot help further since this is an external configuration problem.

Closed issues are NOT monitored, so commenting here is likely to be not seen.
If you think this is still unresolved and have more information to bring, please create another issue.

This is an automated comment setup because @qdm12 is the sole maintainer of this project
which became too popular to monitor issues closed.