Gluetun doesn't work. "panic: runtime error: index out of range [0] with length 0"
abu-marwa opened this issue Β· comments
Today I've started encountering an issue with gluetun. Qbittorrent that uses gluetun as a docker network won't load.
Please see the logs below:
========================================
========================================
=============== gluetun ================
========================================
=========== Made with β€οΈ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version latest built on 2024-04-30T08:08:30.634Z (commit 7e0738d)
π§ 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-05-01T01:48:53Z INFO [routing] default route found: interface eth0, gateway 172.28.0.1, assigned IP 172.28.0.13 and family v4
2024-05-01T01:48:53Z INFO [routing] local ethernet link found: eth0
2024-05-01T01:48:53Z INFO [routing] local ipnet found: 172.28.0.0/27
2024-05-01T01:48:53Z INFO [firewall] enabling...
2024-05-01T01:48:53Z INFO [firewall] enabled successfully
2024-05-01T01:48:54Z INFO [storage] merging by most recent 19425 hardcoded servers and 19425 servers read from /gluetun/servers.json
2024-05-01T01:48:54Z INFO Alpine version: 3.18.6
2024-05-01T01:48:54Z INFO OpenVPN 2.5 version: 2.5.8
2024-05-01T01:48:54Z INFO OpenVPN 2.6 version: 2.6.8
2024-05-01T01:48:54Z INFO Unbound version: 1.19.3
2024-05-01T01:48:54Z INFO IPtables version: v1.8.9
2024-05-01T01:48:54Z INFO Settings summary:
βββ VPN settings:
| βββ VPN provider settings:
| | βββ Name: custom
| | βββ Server selection settings:
| | | βββ VPN type: wireguard
| | | βββ Target IP address: [Redacted]
| | | βββ Wireguard selection settings:
| | | βββ Endpoint IP address: [Redacted]
| | | βββ Endpoint port: [Redacted]
| | | βββ Server public key: [Redacted]
| | βββ Automatic port forwarding settings:
| | βββ Redirection listening port: disabled
| | βββ Use code for provider: protonvpn
| | βββ Forwarded port file path: /tmp/gluetun/forwarded_port
| βββ Wireguard settings:
| βββ Private key: [Redacted]
| βββ Interface addresses:
| | βββ 10.2.0.2/32
| βββ Allowed IPs:
| | βββ 0.0.0.0/0
| | βββ ::/0
| βββ Network interface: tun0
| βββ MTU: 1400
βββ DNS settings:
| βββ Keep existing nameserver(s): no
| βββ DNS server address to use: 127.0.0.1
| βββ DNS over TLS settings:
| βββ Enabled: yes
| βββ Update period: every 24h0m0s
| βββ Unbound settings:
| | βββ Authoritative servers:
| | | βββ cloudflare
| | βββ Caching: yes
| | βββ IPv6: no
| | βββ Verbosity level: 1
| | βββ Verbosity details level: 0
| | βββ Validation log level: 0
| | βββ System user: root
| | βββ Allowed networks:
| | βββ 0.0.0.0/0
| | βββ ::/0
| βββ DNS filtering settings:
| βββ Block malicious: yes
| βββ Block ads: no
| βββ Block surveillance: no
| βββ Blocked IP networks:
| βββ 127.0.0.1/8
| βββ 10.0.0.0/8
| βββ 172.16.0.0/12
| βββ 192.168.0.0/16
| βββ 169.254.0.0/16
| βββ ::1/128
| βββ fc00::/7
| βββ fe80::/10
| βββ ::ffff:127.0.0.1/104
| βββ ::ffff:10.0.0.0/104
| βββ ::ffff:169.254.0.0/112
| βββ ::ffff:172.16.0.0/108
| βββ ::ffff:192.168.0.0/112
βββ Firewall settings:
| βββ Enabled: yes
βββ Log settings:
| βββ Log level: info
βββ Health settings:
| βββ Server listening address: 127.0.0.1:9999
| βββ Target address: cloudflare.com:443
| βββ Duration to wait after success: 5s
| βββ Read header timeout: 100ms
| βββ Read timeout: 500ms
| βββ VPN wait durations:
| βββ Initial duration: 6s
| βββ Additional duration: 5s
βββ Shadowsocks server settings:
| βββ Enabled: no
βββ HTTP proxy settings:
| βββ Enabled: no
βββ Control server settings:
| βββ Listening address: :8000
| βββ Logging: yes
βββ OS Alpine settings:
| βββ Process UID: 1000
| βββ Process GID: 1000
βββ Public IP settings:
| βββ Fetching: every 12h0m0s
| βββ IP file path: /tmp/gluetun/ip
| βββ Public IP data API: ipinfo
βββ Version settings:
βββ Enabled: yes
2024-05-01T01:48:54Z INFO [routing] default route found: interface eth0, gateway 172.28.0.1, assigned IP 172.28.0.13 and family v4
2024-05-01T01:48:54Z INFO [routing] adding route for 0.0.0.0/0
2024-05-01T01:48:54Z INFO [firewall] setting allowed subnets...
2024-05-01T01:48:54Z INFO [routing] default route found: interface eth0, gateway 172.28.0.1, assigned IP 172.28.0.13 and family v4
2024-05-01T01:48:54Z INFO TUN device is not available: open /dev/net/tun: no such file or directory; creating it...
2024-05-01T01:48:54Z INFO [dns] using plaintext DNS at address 1.1.1.1
2024-05-01T01:48:54Z INFO [http server] http server listening on [::]:8000
2024-05-01T01:48:54Z INFO [healthcheck] listening on 127.0.0.1:9999
panic: runtime error: index out of range [0] with length 0
goroutine 88 [running]:
github.com/qdm12/gluetun/internal/provider/custom.getWireguardConnection(...)
github.com/qdm12/gluetun/internal/provider/custom/connection.go:60
github.com/qdm12/gluetun/internal/provider/custom.(*Provider).GetConnection(_, {{0xc000028021, 0x9}, {{0x0, 0xffffa996cc21}, 0xc0000b4000}, {0x0, 0x0, 0x0}, {0x0, ...}, ...}, ...)
github.com/qdm12/gluetun/internal/provider/custom/connection.go:24 +0x35a
github.com/qdm12/gluetun/internal/vpn.setupWireguard({_, _}, {_, _}, {_, _}, {_, _}, {{0xc000028021, 0x9}, ...}, ...)
github.com/qdm12/gluetun/internal/vpn/wireguard.go:20 +0xbe
github.com/qdm12/gluetun/internal/vpn.(*Loop).Run(0xc00012af20, {0x12260e0, 0xc0003feeb0}, 0xc0000a8fc0?)
github.com/qdm12/gluetun/internal/vpn/run.go:40 +0x4df
created by main._main in goroutine 22
./main.go:443 +0x33d7
I noticed that there was a commit dated today, so that might've affected my gluetun.
I run the latest version of docker on the latest version of Debian.
Please let me know if you need any other info from me.
@qdm12 is more or less the only maintainer of this project and works on it in his free time.
Please:
- do not ask for updates, be patient
- π the issue to show your support instead of commenting
@qdm12 usually checks issues at least once a week, if this is a new urgent bug,
revert to an older tagged container image
This is a duplicate of #2244
Count me in as well. I just pulled in latest version and now it's failing, worked fine with the version of 3 weeks ago.
qmcgaw/gluetun latest a30667e1bbb8 24 hours ago 44.8MB => FAILING
qmcgaw/gluetun <none> a9936f298323 3 weeks ago 39.7MB => OK
panic: runtime error: index out of range [0] with length 0
goroutine 102 [running]:
github.com/qdm12/gluetun/internal/provider/custom.getWireguardConnection(...)
github.com/qdm12/gluetun/internal/provider/custom/connection.go:60
github.com/qdm12/gluetun/internal/provider/custom.(*Provider).GetConnection(_, {{0xc000028021, 0x9}, {{0x0, 0xffffb990530d}, 0xc000010018}, {0x0, 0x0, 0x0}, {0x0, ...}, ...}, ...)
github.com/qdm12/gluetun/internal/provider/custom/connection.go:24 +0x35a
github.com/qdm12/gluetun/internal/vpn.setupWireguard({_, _}, {_, _}, {_, _}, {_, _}, {{0xc000028021, 0x9}, ...}, ...)
github.com/qdm12/gluetun/internal/vpn/wireguard.go:20 +0xbe
github.com/qdm12/gluetun/internal/vpn.(*Loop).Run(0xc000204b00, {0x12260e0, 0xc000202aa0}, 0xc00021ecc0?)
github.com/qdm12/gluetun/internal/vpn/run.go:40 +0x4df
created by main._main in goroutine 50
./main.go:443 +0x33d7
I've now added tag on the working one and referring to that one in docker-compose so I temporary stick with the working version from 3 weeks ago until fixed. If there is a way I can help out in another way please let me know.
$ sudo docker tag a9936f298323 qmcgaw/gluetun:working
$ sudo docker images | grep gluetun
qmcgaw/gluetun latest a30667e1bbb8 24 hours ago 44.8MB
qmcgaw/gluetun working a9936f298323 3 weeks ago 39.7MB
$ cat docker-compose.yml
services:
gluetun:
image: qmcgaw/gluetun:working
Fixed just a few minutes ago π Sorry about that!
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.