YunoHost-Apps / uptime-kuma_ynh

Uptime Kuma package for YunoHost
https://uptime.kuma.pet/
GNU Affero General Public License v3.0
12 stars 4 forks source link

Uptime-kuma incorrectly registers downtime, seemingly by connecting to the IPv6 localhost #75

Open kingannoy opened 1 year ago

kingannoy commented 1 year ago

Describe the bug

After a recent update of Yunohost (and apps) Uptime-kuma kept showing errors for all software installed on the "root" domain of the server. The software was not really down, I could visit it no problem. I have managed to solve this for now, but this issue-rapport may help others that have the same issue, and may help in solving it in Yunohost. I'm not sure if this should be solved in uptime-kuma (upstream), in the Yunohost version of uptime-kuma, or in the Yunohost code itself.

It should also be noted that I'm not super knowledgeable on this, it may be that my solution is not the cleanest or safest. It may even be that my analysis of the situation is wrong.

The error is: [example.com I Hate Money] [🔴 Down] connect EINVAL fe80::216:dff:fe2c:4900:443 - Local (:::0)

It appears only for apps that are on the main domain, like: example.com/ihm example.com/doc example.com/nextcloud But not for subdomains like: plume.example.com vw.example.com

Uptime-kuma is running on the same server as the above services, on subdomain: up.example.com

Because of the error I assumed it was an issue related to IPv6. My VPS (currently) doesn't have IPv6 support.

I have tried the following things to fix the issue:

If you run into the same problem, you can ssh in to your server and perform this command:

sudo printf "\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.d/60-ipv6-disable.conf

After this you can either reboot or do: service procps restart

Context

Steps to reproduce

  1. Have the mentioned versions of Uptime-kuma and Yunohost.
  2. Have a VPS without IPv6 support.
  3. Have Uptime-kuma check the services that are installed on the root of the domain/hostname of the server it itself is installed on.

Expected behavior

Logs

I have not shared logs, because AFAIK nothing here will be seen as an "error". Uptime-kuma just thinks the service is down. Yunohost maybe only has some weird incoming connections on the IPv6 localhost that it can't handle, but I doubt those will show up in the logs.

Please let me know if sharing the logs is still useful.

CodeShakingSheep commented 10 months ago

I'm running into the same issue. It's a bit weird. After one update it broke. Then after the next update it worked again and then after the latest update it is broken again.

TheOneAgain commented 1 week ago

I am also having the same issue where uptime-kuma is giving me a connect EINVAL error.

EDIT: To add onto this, my server does have an ipv6 connection, but it's still giving me the same issue as described up in the original post.