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.94k stars 367 forks source link

IP address not found for interface #1663

Closed VanirDev closed 1 year ago

VanirDev commented 1 year ago

Discussed in https://github.com/qdm12/gluetun/discussions/1662

Originally posted by **darthf1** June 8, 2023 Hi! Since recently, I noticed my gluetun container cannot go up anymore, and I noticed the following error log: ``` gluetun | ======================================== gluetun | ======================================== gluetun | =============== gluetun ================ gluetun | ======================================== gluetun | =========== Made with ā¤ļø by ============ gluetun | ======= https://github.com/qdm12 ======= gluetun | ======================================== gluetun | ======================================== gluetun | gluetun | Running version latest built on 2023-06-08T09:55:12.339Z (commit 2ec9293) 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 | 2023-06-08T12:31:57+02:00 WARN DNS_ADDRESS is set to 192.168.2.254 so the DNS over TLS (DoT) server will not be used. The default value changed to 127.0.0.1 so it uses the internal DoT serves. If the DoT server fails to start, the IPv4 address of the first plaintext DNS server corresponding to the first DoT provider chosen is used. gluetun | 2023-06-08T12:31:57+02:00 INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.4 and family v4 gluetun | 2023-06-08T12:31:57+02:00 ERROR getting assigned IP of lo: IP address not found for interface: interface lo in 1 addresses gluetun | 2023-06-08T12:31:57+02:00 INFO Shutdown successful ``` I have no idea what to do about: ``` ERROR getting assigned IP of lo: IP address not found for interface: interface lo in 1 addresses ``` I added `DNS_ADDRESS` which you can see emitted as a warning, but with or without that variable does not change anything. ```yaml version: ā€˜3.9ā€™ services: gluetun: container_name: gluetun image: qmcgaw/gluetun restart: unless-stopped 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 - 8112:8112 - 6881:6881 - 6881:6881/udp volumes: - /volume1/docker/gluetun:/gluetun environment: - PUID=1026 - PGID=100 - DNS_ADDRESS=192.168.2.254 - VPN_SERVICE_PROVIDER= - OPENVPN_USER= - OPENVPN_PASSWORD= - SERVER_REGIONS=Netherlands - TZ=Europe/Amsterdam - FIREWALL_OUTBOUND_SUBNETS=192.168.2.0/24 - UPDATER_PERIOD=24h ```
jbsilva commented 1 year ago

I have a very similar problem with the latest (5031298a57e1) version running on Synology DSM 7.1.1-42962:

Attaching to gluetun
...
gluetun    | 2023-06-08T13:08:52Z INFO [routing] default route found: interface eth0, gateway 172.20.0.1, assigned IP 172.20.0.2 and family v4
gluetun    | 2023-06-08T13:08:52Z ERROR getting assigned IP of lo: IP address not found for interface: interface lo in 1 addresses
gluetun    | 2023-06-08T13:08:52Z INFO Shutdown successful

v3.34 works just fine.

b-col commented 1 year ago

Same issue here (fixed by using 3.34). Also on DSM 7.1.1-42962.

ppouliot commented 1 year ago

I have the same problem when using either openvpn or wiregard through various providers

========================================
========================================
=============== gluetun ================
========================================
=========== Made with ā¤ļø by ============
======= https://github.com/qdm12 =======
========================================
========================================

Running version latest built on 2023-06-08T09:55:12.339Z (commit 2ec9293)

šŸ”§ 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
2023-06-08T14:26:22Z INFO [routing] default route found: interface eth0, gateway 172.17.0.1, assigned IP 172.17.0.2 and family v4
2023-06-08T14:26:22Z ERROR getting assigned IP of lo: IP address not found for interface: interface lo in 1 addresses
2023-06-08T14:26:22Z INFO Shutdown successful
jvince11 commented 1 year ago

I'm sure you've identified that there's a problem with this build by now, I pulled a fresh version of the image less than 10 min ago. Getting the same error as the issue creator.

Confirmed on my end that 'image: qmcgaw/gluetun:v3.34' works as expected for me.

Here are the logs:

{"log":"2023-06-08T07:53:11-07:00 INFO [routing] default route found: interface eth0, gateway 172.20.0.1, assigned IP 172.20.0.2 and family v4\n","stream":"stdout","time":"2023-06-08T14:53:11.40458447Z"}
{"log":"2023-06-08T07:53:11-07:00 ERROR getting assigned IP of lo: IP address not found for interface: interface lo in 1 addresses\n","stream":"stdout","time":"2023-06-08T14:53:11.40673417Z"}
{"log":"2023-06-08T07:53:11-07:00 INFO Shutdown successful\n","stream":"stdout","time":"2023-06-08T14:53:11.407815403Z"}
MajorLOL commented 1 year ago

Same problem here

marcogiorgio commented 1 year ago

Same problem on Synology DSM 7.2-74561. V3.34 works perfectly

qdm12 commented 1 year ago

This might be fixed in 412921fc1f69b39453aa3b3cdc08d3292884f545 on the latest image. I'm not 100% sure it fixes it since the 'broken' version was working fine on my machine, it really depends on the ip routes of the host (which I don't want to change šŸ˜†).

For context, this was due to 40cdb4f662e87e685a209351fec959919360c30b which changed the routes listing to return all routes from all tables (equivalent to ip route show table all), whereas before it would only return routes from the main table (equivalent to ip route). - change was made to help support #1488 -

Let me know if it fixes/doesn't fix it šŸ™ Thanks!

EDIT: Whoops broke it again, 2 minutes, I'll push another fix

qdm12 commented 1 year ago

46755723285740bd73875df16dff28a12ecde379 should fix it for good šŸ˜… Let me know, and of course thanks for running the latest image and enduring the occasional breakdowns!šŸ˜“ It helps produce more stable release images šŸŽ–ļø

vdrover commented 1 year ago

@qdm12 Sorry to be a docker noob here, but is there a way to use 4675572 before a new version is released? I've just reverted my docker-compose to image: qmcgaw/gluetun:v3.34.1 for the time being.

vdrover commented 1 year ago

Also, I am getting the same "sanitizing" of the server_regions to lowercase as we had a few weeks back.

qdm12 commented 1 year ago

Sorry to be a docker noob here, but is there a way to use 4675572 before a new version is released

That's just a commit hash pushed to the master git branch, which triggers a new build for the latest image overriding the previous latest image, so you can docker pull qmcgaw/gluetun and then restart the container to use the new latest image.

Also, I am getting the same "sanitizing" of the server_regions to lowercase as we had a few weeks back.

I think that's expected to be, all inputs are lowercased, does this cause a problem? If so, please create another issue about this, since it's a bit out of scope. As far as I know both v3.34 and the latest images are clear from this problem you linked.

b-col commented 1 year ago

4675572 should fix it for good šŸ˜… Let me know, and of course thanks for running the latest image and enduring the occasional breakdowns!šŸ˜“ It helps produce more stable release images šŸŽ–ļø

This is now working, thanks for the quick fix!

qdm12 commented 1 year ago

Awesome, thanks @b-col for confirming. I'll early-close the issue then, please create another issue if it still doesn't work for you! šŸ‘