louislam / uptime-kuma

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

HTTP(s) checks fail when container starts earlier than Internet works #5254

Open Feriman22 opened 2 days ago

Feriman22 commented 2 days ago

πŸ“‘ I have found these related issues/pull requests

-

πŸ›‘οΈ Security Policy

Description

After a power outage, when the server is restarted, all HTTPS monitors in Uptime Kuma appear as down (red), even though the services are accessible. This state persists even after using the Pause/Start option for individual monitors, and only a full restart of the Uptime Kuma Docker container resolves the issue.

I found out that it's because the internet connection is not ready when Uptime Kuma starts.

πŸ‘Ÿ Reproduction steps

  1. Set a HTTP(s) monitor to anything on the internet
  2. Stop Uptime Kuma
  3. Disable internet connection
  4. Start Uptime Kuma
  5. Enable internet connection
  6. Check will remains red

πŸ‘€ Expected behavior

It should be green (up) when the Internet connection has been established.

πŸ˜“ Actual Behavior

The HTTP(s) monitor will remain red (down) until the container is restarted.

🐻 Uptime-Kuma Version

1.23.15

πŸ’» Operating System and Arch

Debian 12.7

🌐 Browser

Google Chrome Version 130.0.6723.70 (Official Build) (64-bit)

πŸ–₯️ Deployment Environment

πŸ“ Relevant log output

getaddrinfo EAI_AGAIN feriman.com
CommanderStorm commented 2 days ago

getaddrinfo EAI_AGAIN

Below would be my regular response. I am unsure how the Internet connection plays into this. Maybe it broke the DNS you have configured/is the default. Is this reproducible? (if yes, what monitors, ..)

That is a clue that your dns resolver is overwhealmed.

  • Are you using nscd (in the settings) to avoid overwhealming your dns server?
  • What is the TTL on the dns records?
Feriman22 commented 1 day ago

It is reproducible. Only HTTP(s) monitors are affected, which monitor some websites on the internet. What exactly should I check when Uptime Kuma does this?

I have Google DNS servers (8.8.8.8 and 8.8.4.4) configured in my router, but nothing else (in Debian or even in Docker Compose).