louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
59.43k stars 5.32k forks source link

why does uptime-kuma resolve a FQDN as 127.0.1.1? #4714

Closed y8s closed 6 months ago

y8s commented 6 months ago

⚠️ Please verify that this question has NOT been raised before.

🛡️ Security Policy

📝 Describe your problem

I have a pihole that keeps appearing as "down" every check when it is absolutely up. I get the error connect ECONNREFUSED 127.0.1.1:443 I have no reference to 127.0.1.1 anywhere on the host machine or in my compose.

so I logged into the container for uptime-kuma and pinged the host giving that error and I get this: (domain.com is not the actual domain but I do have a real domain behind a caddy proxy with DNS challenges)

📝 Error Message(s) or Log

root@d8fd4a6435d4:/app# ping dns1
PING dns1 (10.10.8.1) 56(84) bytes of data.
64 bytes from pi.hole (10.10.8.1): icmp_seq=1 ttl=63 time=1.99 ms
64 bytes from pi.hole (10.10.8.1): icmp_seq=2 ttl=63 time=0.729 ms
^C
--- dns1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 0.729/1.360/1.991/0.631 ms
root@d8fd4a6435d4:/app# ping dns1.domain.com
PING dns1.domain.com (127.0.1.1) 56(84) bytes of data.
64 bytes from dns1.domain.com (127.0.1.1): icmp_seq=1 ttl=64 time=0.080 ms
64 bytes from dns1.domain.com (127.0.1.1): icmp_seq=2 ttl=64 time=0.067 ms

🐻 Uptime-Kuma Version

Version: 1.23.12

💻 Operating System and Arch

Linux iot 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux

🌐 Browser

Chrome Version 124.0.6367.91 (Official Build) (64-bit)

🖥️ Deployment Environment

louislam commented 6 months ago

You should google "127.0.1.1 pihole", because there have been a lot of people who have also asked this.

Uptime Kuma's container contains nscd, but I don't think it would modify your DNS records.

y8s commented 6 months ago

I had googled many things and thought I had fixed it by removing all references to 127.0.1.1 but it was still "stuck" in the pihole server somewhere.

A reboot cleared it out and now it's working properly.

to clarify: I remove the 127.0.1.1 entries from the hosts file on the docker host as well as the pihole server and replaced them with the actual IP of each machine.

CommanderStorm commented 6 months ago

A reboot cleared it out and now it's working properly.

I guess this is resolved

y8s commented 6 months ago

A reboot cleared it out and now it's working properly.

I guess this is resolved

Yes, thanks.