Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Gluetun keep restarting #1289

Closed
jackthenewbie opened this issue Dec 14, 2022 · 3 comments
Closed

Bug: Gluetun keep restarting #1289

jackthenewbie opened this issue Dec 14, 2022 · 3 comments

Comments

@jackthenewbie
Copy link

jackthenewbie commented Dec 14, 2022

Is this urgent?

No

Host OS

Windows wsl2

CPU arch

x86_64

VPN service provider

Surfshark

What are you using to run the container

docker-compose

What is the version of Gluetun

2022-12-13 20:12:26 Running version latest built on 2022-12-07T10:39:00.476Z (commit c0a3016)

What's the problem 🤔

Possible duplicate #641 #1074
When I was reading these 2 issues, it seems similar with my situation. I connect to vpn for a long time. However, when I tried switch to mullvad, same problem is happening. At first I connect to mullvad for like over 24h, thought that the error is same as mentioned issue-> tried switch to surfshark. Samething happening. What could be the issue?

Share your logs

2022-12-13 20:12:26 ========================================
2022-12-13 20:12:26 ========================================
2022-12-13 20:12:26 =============== gluetun ================
2022-12-13 20:12:26 ========================================
2022-12-13 20:12:26 =========== Made with ❤️ by ============
2022-12-13 20:12:26 ======= https://github.com/qdm12 =======
2022-12-13 20:12:26 ========================================
2022-12-13 20:12:26 ========================================
2022-12-13 20:12:26 
2022-12-13 20:12:26 Running version latest built on 2022-12-07T10:39:00.476Z (commit c0a3016)
2022-12-13 20:12:26 
2022-12-13 20:12:26 🔧 Need help? https://github.com/qdm12/gluetun/discussions/new
2022-12-13 20:12:26 🐛 Bug? https://github.com/qdm12/gluetun/issues/new
2022-12-13 20:12:26 ✨ New feature? https://github.com/qdm12/gluetun/issues/new
2022-12-13 20:12:26 ☕ Discussion? https://github.com/qdm12/gluetun/discussions/new
2022-12-13 20:12:26 💻 Email? quentin.mcgaw@gmail.com
2022-12-13 20:12:26 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2022-12-13 20:12:26 2022-12-14T03:12:26Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1 and assigned IP 172.24.0.2
2022-12-13 20:12:26 2022-12-14T03:12:26Z INFO [routing] local ethernet link found: eth0
2022-12-13 20:12:26 2022-12-14T03:12:26Z INFO [routing] local ipnet found: 172.24.0.0/16
2022-12-13 20:12:27 2022-12-14T03:12:27Z INFO [firewall] enabling...
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [firewall] enabled successfully
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [storage] creating /gluetun/servers.json with 13222 hardcoded servers
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO Alpine version: 3.16.3
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO OpenVPN 2.4 version: 2.4.12
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO OpenVPN 2.5 version: 2.5.6
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO Unbound version: 1.15.0
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO IPtables version: v1.8.8
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO Settings summary:
2022-12-13 20:12:28 ├── VPN settings:
2022-12-13 20:12:28 |   ├── VPN provider settings:
2022-12-13 20:12:28 |   |   ├── Name: surfshark
2022-12-13 20:12:28 |   |   └── Server selection settings:
2022-12-13 20:12:28 |   |       ├── VPN type: wireguard
2022-12-13 20:12:28 |   |       ├── Hostnames: ca-van.prod.surfshark.com
2022-12-13 20:12:28 |   |       └── Wireguard selection settings:
2022-12-13 20:12:28 |   └── Wireguard settings:
2022-12-13 20:12:28 |       ├── Private key: OI...FU=
2022-12-13 20:12:28 |       ├── Interface addresses:
2022-12-13 20:12:28 |       |   └── 10.14.0.2/16
2022-12-13 20:12:28 |       └── Network interface: tun0
2022-12-13 20:12:28 ├── DNS settings:
2022-12-13 20:12:28 |   ├── DNS server address to use: 127.0.0.1
2022-12-13 20:12:28 |   ├── Keep existing nameserver(s): no
2022-12-13 20:12:28 |   └── DNS over TLS settings:
2022-12-13 20:12:28 |       ├── Enabled: yes
2022-12-13 20:12:28 |       ├── Update period: every 24h0m0s
2022-12-13 20:12:28 |       ├── Unbound settings:
2022-12-13 20:12:28 |       |   ├── Authoritative servers:
2022-12-13 20:12:28 |       |   |   └── cloudflare
2022-12-13 20:12:28 |       |   ├── Caching: yes
2022-12-13 20:12:28 |       |   ├── IPv6: no
2022-12-13 20:12:28 |       |   ├── Verbosity level: 1
2022-12-13 20:12:28 |       |   ├── Verbosity details level: 0
2022-12-13 20:12:28 |       |   ├── Validation log level: 0
2022-12-13 20:12:28 |       |   ├── System user: root
2022-12-13 20:12:28 |       |   └── Allowed networks:
2022-12-13 20:12:28 |       |       ├── 0.0.0.0/0
2022-12-13 20:12:28 |       |       └── ::/0
2022-12-13 20:12:28 |       └── DNS filtering settings:
2022-12-13 20:12:28 |           ├── Block malicious: yes
2022-12-13 20:12:28 |           ├── Block ads: no
2022-12-13 20:12:28 |           ├── Block surveillance: no
2022-12-13 20:12:28 |           └── Blocked IP networks:
2022-12-13 20:12:28 |               ├── 127.0.0.1/8
2022-12-13 20:12:28 |               ├── 10.0.0.0/8
2022-12-13 20:12:28 |               ├── 172.16.0.0/12
2022-12-13 20:12:28 |               ├── 192.168.0.0/16
2022-12-13 20:12:28 |               ├── 169.254.0.0/16
2022-12-13 20:12:28 |               ├── ::1/128
2022-12-13 20:12:28 |               ├── fc00::/7
2022-12-13 20:12:28 |               ├── fe80::/10
2022-12-13 20:12:28 |               ├── ::ffff:7f00:1/104
2022-12-13 20:12:28 |               ├── ::ffff:a00:0/104
2022-12-13 20:12:28 |               ├── ::ffff:a9fe:0/112
2022-12-13 20:12:28 |               ├── ::ffff:ac10:0/108
2022-12-13 20:12:28 |               └── ::ffff:c0a8:0/112
2022-12-13 20:12:28 ├── Firewall settings:
2022-12-13 20:12:28 |   └── Enabled: yes
2022-12-13 20:12:28 ├── Log settings:
2022-12-13 20:12:28 |   └── Log level: INFO
2022-12-13 20:12:28 ├── Health settings:
2022-12-13 20:12:28 |   ├── Server listening address: 127.0.0.1:9999
2022-12-13 20:12:28 |   ├── Target address: cloudflare.com:443
2022-12-13 20:12:28 |   ├── Read header timeout: 100ms
2022-12-13 20:12:28 |   ├── Read timeout: 500ms
2022-12-13 20:12:28 |   └── VPN wait durations:
2022-12-13 20:12:28 |       ├── Initial duration: 6s
2022-12-13 20:12:28 |       └── Additional duration: 1m0s
2022-12-13 20:12:28 ├── Shadowsocks server settings:
2022-12-13 20:12:28 |   └── Enabled: no
2022-12-13 20:12:28 ├── HTTP proxy settings:
2022-12-13 20:12:28 |   └── Enabled: no
2022-12-13 20:12:28 ├── Control server settings:
2022-12-13 20:12:28 |   ├── Listening address: :8000
2022-12-13 20:12:28 |   └── Logging: yes
2022-12-13 20:12:28 ├── OS Alpine settings:
2022-12-13 20:12:28 |   ├── Process UID: 1000
2022-12-13 20:12:28 |   └── Process GID: 1000
2022-12-13 20:12:28 ├── Public IP settings:
2022-12-13 20:12:28 |   ├── Fetching: every 12h0m0s
2022-12-13 20:12:28 |   └── IP file path: /tmp/gluetun/ip
2022-12-13 20:12:28 └── Version settings:
2022-12-13 20:12:28     └── Enabled: yes
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO IPv6 is not supported
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1 and assigned IP 172.24.0.2
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [routing] adding route for 0.0.0.0/0
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [firewall] setting allowed subnets...
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1 and assigned IP 172.24.0.2
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO TUN device is not available: open /dev/net/tun: no such file or directory; creating it...
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [dns over tls] using plaintext DNS at address 1.1.1.1
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [http server] http server listening on [::]:8000
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [firewall] allowing VPN connection...
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [healthcheck] listening on 127.0.0.1:9999
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [wireguard] Using available kernelspace implementation
2022-12-13 20:12:28 2022-12-14T03:12:28Z INFO [wireguard] Connecting to 66.115.147.67:51820
2022-12-13 20:12:29 2022-12-14T03:12:29Z INFO [wireguard] Wireguard is up
2022-12-13 20:12:29 2022-12-14T03:12:29Z INFO [dns over tls] downloading DNS over TLS cryptographic files
2022-12-13 20:12:36 2022-12-14T03:12:36Z INFO [healthcheck] program has been unhealthy for 6s: restarting VPN
2022-12-13 20:12:36 2022-12-14T03:12:36Z INFO [vpn] stopping
2022-12-13 20:12:36 2022-12-14T03:12:36Z ERROR [vpn] cannot get version information: Get "https://api.github.com/repos/qdm12/gluetun/commits": context canceled
2022-12-13 20:12:36 2022-12-14T03:12:36Z INFO [vpn] starting
2022-12-13 20:12:36 2022-12-14T03:12:36Z INFO [firewall] allowing VPN connection...
2022-12-13 20:12:37 2022-12-14T03:12:37Z INFO [wireguard] Using available kernelspace implementation
2022-12-13 20:12:37 2022-12-14T03:12:37Z INFO [wireguard] Connecting to 172.83.40.149:51820
2022-12-13 20:12:37 2022-12-14T03:12:37Z INFO [wireguard] Wireguard is up
2022-12-13 20:12:39 2022-12-14T03:12:39Z WARN [dns over tls] cannot update files: Get "https://www.internic.net/domain/named.root": dial tcp: lookup www.internic.net on 1.1.1.1:53: read udp 10.14.0.2:36955->1.1.1.1:53: i/o timeout
2022-12-13 20:12:39 2022-12-14T03:12:39Z INFO [dns over tls] attempting restart in 10s
2022-12-13 20:12:49 2022-12-14T03:12:49Z INFO [dns over tls] downloading DNS over TLS cryptographic files
2022-12-13 20:12:59 2022-12-14T03:12:59Z WARN [dns over tls] cannot update files: Get "https://www.internic.net/domain/named.root": dial tcp: lookup www.internic.net on 1.1.1.1:53: read udp 10.14.0.2:37444->1.1.1.1:53: i/o timeout
2022-12-13 20:12:59 2022-12-14T03:12:59Z INFO [dns over tls] attempting restart in 20s
2022-12-13 20:13:19 2022-12-14T03:13:19Z INFO [dns over tls] downloading DNS over TLS cryptographic files
2022-12-13 20:13:29 2022-12-14T03:13:29Z WARN [dns over tls] cannot update files: Get "https://www.internic.net/domain/named.root": dial tcp: lookup www.internic.net on 1.1.1.1:53: read udp 10.14.0.2:53459->1.1.1.1:53: i/o timeout
2022-12-13 20:13:29 2022-12-14T03:13:29Z INFO [dns over tls] attempting restart in 40s
2022-12-13 20:13:44 2022-12-14T03:13:44Z INFO [healthcheck] program has been unhealthy for 1m6s: restarting VPN
2022-12-13 20:13:44 2022-12-14T03:13:44Z INFO [vpn] stopping
2022-12-13 20:13:44 2022-12-14T03:13:44Z INFO [vpn] starting
2022-12-13 20:13:44 2022-12-14T03:13:44Z INFO [firewall] allowing VPN connection...
2022-12-13 20:13:45 2022-12-14T03:13:45Z INFO [wireguard] Using available kernelspace implementation
2022-12-13 20:13:45 2022-12-14T03:13:45Z INFO [wireguard] Connecting to 66.115.147.94:51820
2022-12-13 20:13:45 2022-12-14T03:13:45Z INFO [wireguard] Wireguard is up
2022-12-13 20:14:09 2022-12-14T03:14:09Z INFO [dns over tls] downloading DNS over TLS cryptographic files
2022-12-13 20:14:19 2022-12-14T03:14:19Z WARN [dns over tls] cannot update files: Get "https://www.internic.net/domain/named.root": dial tcp: lookup www.internic.net on 1.1.1.1:53: read udp 10.14.0.2:37542->1.1.1.1:53: i/o timeout
2022-12-13 20:14:19 2022-12-14T03:14:19Z INFO [dns over tls] attempting restart in 1m20s
2022-12-13 20:15:39 2022-12-14T03:15:39Z INFO [dns over tls] downloading DNS over TLS cryptographic files
2022-12-13 20:15:49 2022-12-14T03:15:49Z WARN [dns over tls] cannot update files: Get "https://www.internic.net/domain/named.root": dial tcp: lookup www.internic.net on 1.1.1.1:53: read udp 10.14.0.2:41715->1.1.1.1:53: i/o timeout
2022-12-13 20:15:49 2022-12-14T03:15:49Z INFO [dns over tls] attempting restart in 2m40s
2022-12-13 20:15:53 2022-12-14T03:15:53Z INFO [healthcheck] program has been unhealthy for 2m6s: restarting VPN
2022-12-13 20:15:53 2022-12-14T03:15:53Z INFO [vpn] stopping
2022-12-13 20:15:53 2022-12-14T03:15:53Z INFO [vpn] starting
2022-12-13 20:15:53 2022-12-14T03:15:53Z INFO [firewall] allowing VPN connection...
2022-12-13 20:15:53 2022-12-14T03:15:53Z INFO [wireguard] Using available kernelspace implementation
2022-12-13 20:15:53 2022-12-14T03:15:53Z INFO [wireguard] Connecting to 66.115.147.94:51820
2022-12-13 20:15:53 2022-12-14T03:15:53Z INFO [wireguard] Wireguard is up

Share your configuration

version: "3"

services:
  gluetun:
    image: qmcgaw/gluetun
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=surfshark
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=
      - WIREGUARD_ADDRESSES=
      - SERVER_HOSTNAMES=ca-van.prod.surfshark.com
      - HEALTH_VPN_DURATION_ADDITION=60s
    ports:
      - 80:80
      - 8080:8080
  rtb:
    container_name: rtb
    image: rtb:latest
    restart: on-failure
    volumes:
      - ".:/usr/src/app"
    network_mode: service:gluetun
    depends_on:
      gluetun:
        condition: service_started
@qdm12
Copy link
Owner

qdm12 commented Dec 14, 2022

See https://github.com/qdm12/gluetun/wiki/Healthcheck#unhealthy

Check your host firewall isn't blocking outbound connections, and check your Docker version

Also maybe check your Wireguard keys are correct, you can use LOG_LEVEL=debug to log out parts of your keys.

(#641 has nothing to do with this issue)

@qdm12 qdm12 closed this as completed Dec 14, 2022
@johngleeson
Copy link

johngleeson commented Dec 25, 2022

@jackthenewbie Turning the Gluetun firewall off fixed this issue for me. Obviously not a permanent solution, just a workaround.

@qdm12
Copy link
Owner

qdm12 commented Dec 26, 2022

Not a workaround, this means it connects outside the vpn so you're leaking traffic. If the vpn connection doesn't work, you have to fix it somehow, that's it 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants