Help: issues with getting ip? #61

Closed
opened 2025-11-20 04:19:36 -05:00 by saavagebueno · 10 comments
Owner

Originally created by @arthur798 on GitHub (Sep 20, 2020).

I am now running the container however I am getting an issue like below:

2020-09-20T22:15:10.011Z	INFO	Found single setting to update record
2020-09-20T22:15:20.055Z	WARN	HTTP GET failed for https://google.com: Get "https://google.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2020-09-20T22:15:20.055Z	WARN	HTTP GET failed for http://google.com: Get "http://google.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2020-09-20T22:15:20.055Z	WARN	Domain name resolution is not working for google.com: lookup google.com on 127.0.0.11:53: read udp 127.0.0.1:53330->127.0.0.11:53: i/o timeout
2020-09-20T22:15:20.055Z	INFO	Reading history from database: domain cloudbluedigital.co.uk host @
2020-09-20T22:15:20.056Z	INFO	Web UI listening at address 0.0.0.0:8000 with root URL ""
2020-09-20T22:15:20.058Z	INFO	backup: disabled
2020-09-20T22:15:30.056Z	ERROR	cannot get public ipv4 address: Get "https://api.ipify.org": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

How can I possibly debug this to find out why it is erroring?

Originally created by @arthur798 on GitHub (Sep 20, 2020). I am now running the container however I am getting an issue like below: ``` 2020-09-20T22:15:10.011Z INFO Found single setting to update record 2020-09-20T22:15:20.055Z WARN HTTP GET failed for https://google.com: Get "https://google.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers) 2020-09-20T22:15:20.055Z WARN HTTP GET failed for http://google.com: Get "http://google.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers) 2020-09-20T22:15:20.055Z WARN Domain name resolution is not working for google.com: lookup google.com on 127.0.0.11:53: read udp 127.0.0.1:53330->127.0.0.11:53: i/o timeout 2020-09-20T22:15:20.055Z INFO Reading history from database: domain cloudbluedigital.co.uk host @ 2020-09-20T22:15:20.056Z INFO Web UI listening at address 0.0.0.0:8000 with root URL "" 2020-09-20T22:15:20.058Z INFO backup: disabled 2020-09-20T22:15:30.056Z ERROR cannot get public ipv4 address: Get "https://api.ipify.org": context deadline exceeded (Client.Timeout exceeded while awaiting headers) ``` How can I possibly debug this to find out why it is erroring?
Author
Owner

@qdm12 commented on GitHub (Sep 20, 2020):

Hm looks like the container has no internet connection at all. Is your host connected to Internet successfully?

@qdm12 commented on GitHub (Sep 20, 2020): Hm looks like the container has no internet connection at all. Is your host connected to Internet successfully?
Author
Owner

@arthur798 commented on GitHub (Sep 20, 2020):

Yeah I have loads of containers running fine

@arthur798 commented on GitHub (Sep 20, 2020): Yeah I have loads of containers running fine
Author
Owner

@qdm12 commented on GitHub (Sep 20, 2020):

Maybe it's just a DNS issue. At start the container tries to reach google.com to check Internet works, and the error read udp 127.0.0.1:53330->127.0.0.11:53: i/o timeout shows that it cannot resolve it. What are you using to launch your containers?

@qdm12 commented on GitHub (Sep 20, 2020): Maybe it's just a DNS issue. At start the container tries to reach google.com to check Internet works, and the error `read udp 127.0.0.1:53330->127.0.0.11:53: i/o timeout` shows that it cannot resolve it. What are you using to launch your containers?
Author
Owner

@arthur798 commented on GitHub (Sep 20, 2020):

# DDNS-Updater - Update DDNS on Cloudflare
  ddns-updater:
    image: qmcgaw/ddns-updater
    container_name: ddns-updater
    restart: always
    ports:
      - 8000:8000/tcp
    volumes:
      - $USERDIR/docker/ddns-updater/data:/updater/data
    environment:
      - PERIOD=5m
      - IP_METHOD=cycle
      - IPV4_METHOD=cycle
      - IPV6_METHOD=cycle
      - HTTP_TIMEOUT=10s

      # Web UI
      - LISTENING_PORT=8000
      - ROOT_URL=/

      # Backup
      - BACKUP_PERIOD=0 # 0 to disable
      - BACKUP_DIRECTORY=/updater/data

So I just use the above to run the container

@arthur798 commented on GitHub (Sep 20, 2020): ``` # DDNS-Updater - Update DDNS on Cloudflare ddns-updater: image: qmcgaw/ddns-updater container_name: ddns-updater restart: always ports: - 8000:8000/tcp volumes: - $USERDIR/docker/ddns-updater/data:/updater/data environment: - PERIOD=5m - IP_METHOD=cycle - IPV4_METHOD=cycle - IPV6_METHOD=cycle - HTTP_TIMEOUT=10s # Web UI - LISTENING_PORT=8000 - ROOT_URL=/ # Backup - BACKUP_PERIOD=0 # 0 to disable - BACKUP_DIRECTORY=/updater/data ``` So I just use the above to run the container
Author
Owner

@qdm12 commented on GitHub (Sep 20, 2020):

Try adding

network_mode: bridge
dns:
  - 1.1.1.1

to your container specification it might solve it?

@qdm12 commented on GitHub (Sep 20, 2020): Try adding ```yml network_mode: bridge dns: - 1.1.1.1 ``` to your container specification it might solve it?
Author
Owner

@arthur798 commented on GitHub (Sep 21, 2020):

thanks @qdm12 that seems to work although I am not sure why I had to explicitly at that to container

@arthur798 commented on GitHub (Sep 21, 2020): thanks @qdm12 that seems to work although I am not sure why I had to explicitly at that to container
Author
Owner

@qdm12 commented on GitHub (Sep 21, 2020):

Does the network_mode line solves it by itself? If not then it's a DNS issue. In this case, you force the DNS to be 1.1.1.1 (cloudflare). You can try running a container and see if DNS works

docker run -it --rm alpine:3.12
nslookup google.com
@qdm12 commented on GitHub (Sep 21, 2020): Does the network_mode line solves it by itself? If not then it's a DNS issue. In this case, you force the DNS to be `1.1.1.1` (cloudflare). You can try running a container and see if DNS works ```sh docker run -it --rm alpine:3.12 nslookup google.com ```
Author
Owner

@qdm12 commented on GitHub (Sep 24, 2020):

Did you figure out what was wrong? Can I close the issue? It seems irrelevant to the container although I don't want to rush to conclusions either.

@qdm12 commented on GitHub (Sep 24, 2020): Did you figure out what was wrong? Can I close the issue? It seems irrelevant to the container although I don't want to rush to conclusions either.
Author
Owner

@bverkron commented on GitHub (Jan 3, 2024):

As a follow up I had the same issue and it required the DNS setting to fix. Bridge mode on it's own did not solve it for me.

It may or may not have to do with PiHole which I'm also running. I only saw successes in PiHole for the requests the ddns container was complaining failed, so it if is PiHole I'm not exactly sure where / how it's interfering since the DNS queries seem to go through. All I know is adding the direct 1.1.1.1 DNS into the compose settings worked.

2024-01-02T23:53:44-08:00 INFO reading JSON config from file /updater/data/config.json
2024-01-02T23:53:44-08:00 INFO Found single setting to update record
2024-01-02T23:53:54-08:00 WARN performing request: Get "https://github.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2024-01-02T23:53:54-08:00 INFO Reading history from database: domain domain.com host @
2024-01-02T23:53:54-08:00 INFO [healthcheck server] listening on 127.0.0.1:9999
2024-01-02T23:53:54-08:00 INFO [http server] listening on :8000
2024-01-02T23:53:54-08:00 INFO [backup] disabled
2024-01-02T23:53:59-08:00 WARN obtaining ipv4 or ipv6 address: try 1 of 3: Get "https://ifconfig.io/ip": context deadline exceeded
2024-01-02T23:54:02-08:00 WARN obtaining ipv4 or ipv6 address: try 2 of 3: dial tcp: lookup cloudflare-dns.com: i/o timeout
2024-01-02T23:54:07-08:00 WARN obtaining ipv4 or ipv6 address: try 3 of 3: Get "https://ipinfo.io/ip": context deadline exceeded
2024-01-02T23:54:07-08:00 ERROR Get "https://ipinfo.io/ip": context deadline exceeded
2024/01/02 23:54:28 "GET http://192.168.1.101:8000/ HTTP/1.1" from 192.168.1.145:51354 - 200 1658B in 259.582µs
image
@bverkron commented on GitHub (Jan 3, 2024): As a follow up I had the same issue and it required the DNS setting to fix. Bridge mode on it's own did not solve it for me. It may or may not have to do with PiHole which I'm also running. I only saw successes in PiHole for the requests the ddns container was complaining failed, so it if is PiHole I'm not exactly sure where / how it's interfering since the DNS queries seem to go through. All I know is adding the direct 1.1.1.1 DNS into the compose settings worked. ``` 2024-01-02T23:53:44-08:00 INFO reading JSON config from file /updater/data/config.json 2024-01-02T23:53:44-08:00 INFO Found single setting to update record 2024-01-02T23:53:54-08:00 WARN performing request: Get "https://github.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers) 2024-01-02T23:53:54-08:00 INFO Reading history from database: domain domain.com host @ 2024-01-02T23:53:54-08:00 INFO [healthcheck server] listening on 127.0.0.1:9999 2024-01-02T23:53:54-08:00 INFO [http server] listening on :8000 2024-01-02T23:53:54-08:00 INFO [backup] disabled 2024-01-02T23:53:59-08:00 WARN obtaining ipv4 or ipv6 address: try 1 of 3: Get "https://ifconfig.io/ip": context deadline exceeded 2024-01-02T23:54:02-08:00 WARN obtaining ipv4 or ipv6 address: try 2 of 3: dial tcp: lookup cloudflare-dns.com: i/o timeout 2024-01-02T23:54:07-08:00 WARN obtaining ipv4 or ipv6 address: try 3 of 3: Get "https://ipinfo.io/ip": context deadline exceeded 2024-01-02T23:54:07-08:00 ERROR Get "https://ipinfo.io/ip": context deadline exceeded 2024/01/02 23:54:28 "GET http://192.168.1.101:8000/ HTTP/1.1" from 192.168.1.145:51354 - 200 1658B in 259.582µs ``` <img width="1237" alt="image" src="https://github.com/qdm12/ddns-updater/assets/19174503/6a08a0b7-8b1e-4171-b15c-4d327cd43159">
Author
Owner

@qdm12 commented on GitHub (Jun 16, 2024):

@bverkron an error like read udp 127.0.0.1:53330->127.0.0.11:53: i/o timeout means the DNS is not working; in your case context deadline exceeded (Client.Timeout exceeded while awaiting headers) means just the http connection hangs, it should not be a DNS issue. No idea really 🤔 !

@qdm12 commented on GitHub (Jun 16, 2024): @bverkron an error like `read udp 127.0.0.1:53330->127.0.0.11:53: i/o timeout` means the DNS is not working; in your case `context deadline exceeded (Client.Timeout exceeded while awaiting headers)` means just the http connection hangs, it should not be a DNS issue. No idea really 🤔 !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#61