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.
https://hub.docker.com/r/qmcgaw/gluetun
MIT License
7.38k stars 349 forks source link

Bug: The configured network interface is invalid. Interface: "tun0" #2427

Open peterweissbier opened 3 weeks ago

peterweissbier commented 3 weeks ago

Is this urgent?

No

Host OS

archlinux

CPU arch

x86_64

VPN service provider

Custom

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built 2024-08-19T17:09:35.713Z (commit 3f13093)

What's the problem 🤔

The configured network interface is invalid. Interface: "tun0" error when the interface is set to tun0 next output is Trying to listen on the following list of IP addresses: "tun0:6881" so i guess its fine because it found the port just wanted you to know that this error message is showing up just in case its an actual bug

Share your logs (at least 10 lines)

(N) 2024-08-19T19:26:18 - qBittorrent v4.6.5 started
(N) 2024-08-19T19:26:18 - Using config directory: /config/qBittorrent
(C) 2024-08-19T19:26:18 - The configured network interface is invalid. Interface: "tun0"
(N) 2024-08-19T19:26:18 - Trying to listen on the following list of IP addresses: "tun0:6881"
(I) 2024-08-19T19:26:18 - Peer ID: "-qB4650-"
(I) 2024-08-19T19:26:18 - HTTP User-Agent: "qBittorrent/4.6.5"
(I) 2024-08-19T19:26:18 - Distributed Hash Table (DHT) support: ON
(I) 2024-08-19T19:26:18 - Local Peer Discovery support: ON
(I) 2024-08-19T19:26:18 - Peer Exchange (PeX) support: ON
(I) 2024-08-19T19:26:18 - Anonymous mode: OFF
(I) 2024-08-19T19:26:18 - Encryption support: ON
(N) 2024-08-19T19:26:18 - Restored torrent. Torrent: "Master.Collection.2024"
(I) 2024-08-19T19:26:18 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Thu Aug 1 02:41:08 2024.
(N) 2024-08-19T19:26:18 - Using built-in WebUI.
(N) 2024-08-19T19:26:18 - WebUI translation for selected locale (en) has been successfully loaded.
(N) 2024-08-19T19:26:18 - WebUI: Now listening on IP: *, port: 6011
(N) 2024-08-19T19:26:18 - Watching folder: "/mnt/sdb1/Downloads"
(I) 2024-08-19T19:26:18 - Successfully listening on IP. IP: "172.16.0.2". Port: "TCP/6881"
(I) 2024-08-19T19:26:18 - Successfully listening on IP. IP: "172.16.0.2". Port: "UTP/6881"
(I) 2024-08-19T19:26:40 - Detected external IP. IP: "104.28.192.240"
(N) 2024-08-19T19:29:10 - WebAPI login success. IP: ::ffff:172.18.0.1

Share your configuration

services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 6081:6881
      - 6081:6881/udp
      - 6011:6011
      - 8000:8000/tcp
    volumes:
      - /mnt/sdb1/Documents/qbittorrent/gluetun:/gluetun
      - /etc/localtime:/etc/localtime:ro
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK_SET=022
      - TZ=Europe/Berlin
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
      - VPN_ENDPOINT_IP=162.159.192.1
      - VPN_ENDPOINT_PORT=2408
      - WIREGUARD_PUBLIC_KEY=
      - WIREGUARD_PRIVATE_KEY=
      - WIREGUARD_ADDRESSES=172.16.0.2/32
    restart: unless-stopped

  qbittorrent:
    image: ghcr.io/linuxserver/qbittorrent
    container_name: qbittorrent
    network_mode: "service:gluetun"
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK_SET=022
      - TZ=Europe/Berlin
      - WEBUI_PORT=6011
    volumes:
      - /mnt/sdb1/Documents/qbittorrent/config:/config
      - /mnt/sdb1/Downloads:/downloads
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
github-actions[bot] commented 3 weeks ago

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

qdm12 commented 3 weeks ago

I'm not sure, this is the first time I see this, and it's a qbittorrent log; I saw https://github.com/qbittorrent/qBittorrent/issues/143 which gives the same error. When do you get this error logged? Is it when Gluetun boots? That would explain it, because the tun0 interface may not be setup already, since it can take a few seconds. If you launch qbittorrent after Gluetun has established the VPN connection, does it log that as well?

peterweissbier commented 1 week ago

Yeah it happens on container boot. I can't test right now when I run separately if it happens too. Can test on weekend.