-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to connect when setting up Uptime Kuma integration #99
Comments
Same error for me. Also tried with API keys and unable to connect. |
Same error here. This all begin after updating to home assistant 2024.5
if i try to open link in browser uptimekuma.myserver.com:443/metrics i cant log in. Username and password is correct. I can log in with https://uptimekuma.myserver.com and i see metrics when I'm log in. |
Using the HACS plugin on port 3001. Having the issue of Failed to connect. Even disabled authentication, API or user creds. All have the same issue. |
I have not yet been able to reproduce this on 2024.05.x. My suspicion is that it is related to SSL. I've had lots of reports in the past about authentication failing but they've always been when the user was not using a valid ssl certificate or when ignoring ssl. I would recommend using SSL since it is trivial to setup these days with tools like NGINXproxymanager that can easily renew certificates (including wildcard certificates which can allow you to use a single certificate for all of your services). I'm welcome to pull requests that would fix this issue for non-ssl or self-signed ssl users, however It's not something I have time to investigate ATM. |
It's also possible this could be related: #91 (comment) |
I'm using ngnix with letsencrypt in docker. I bought a domain and configured some of the containers to use subdomans like https://uptimekuma.myserver.com/.
If I open that url in browser I cant log in as it is asking for credentials over and over again. The same thing is if I try http address. But this is my username and password for uk. |
If you cannot log into uptimekuma using https://uptimekuma.my.com:443/metrics', then it is an uptimekuma issue or perhaps uptimekuma changed its auth mechanism. What version of uptime kuma are you on? |
I'm using ver. 1.23.13
I can log into dashboard with credentials using both http and https. |
@dandek01 Thanks. That's the version I'm on and essentially the same compose file I'm using. |
Clarify login instructions for those facing #99 as this has been a constant issue.
Please also re-review the readme instructions as i have clarified the required credentials and added a troubleshooting section. |
I reviewed my nginx settings. I created access list to allow connections only from my local ips. I removed that from all containers I put it on and now I can access and log in using api on host https://uptimekuma.mysever.com/metrics
Note "/" before :433. If I try to open this page in browser I got page not found. My suspicions is on nginx config file for uptime kuma, but I'm not sure. I tied to set it up without "/" at the end but the same thing. It tries to connect to non existent url.
This config is generated using nginx webui. |
That config looks pretty good to me. You could try turning off some of the additional options like HSTS, Caching, Exploit blocking, etc to see if that helps, but i suspect not. The extra |
I tied to turn on/off additional options, restore it from backup, rebuild image. Nothing. The only thing I didnt try is to delete container, it's image, local files, pull it from docker hub and reconfigure everything from scratch. |
If you can login using the metrics endpoint on a private browser window using your uptimekuma api key, then there's nothing wrong with Uptimekuma, and it would have to be with either your network, the integration, or homeassistant. |
I think that problem is the same for uptime kuma, frigate and adguard integration connecting them over ssl. |
I use the adguard and uptimekuma integrations with ssl and haven't had any issues (I'm also using nginx proxy with almost identical configurations as you showed), so I'm not really sure how to help. |
No. I tried to add uptime kuma from hacs repository but ha wont let me add it as this integration is already built in home assistant. |
I'm referring to the integration in HACS, not the UptimeKuma HomeAssistant AddOn. If you're using the HomeAssistant UptimeKuma Addon, there have been lots of reported issues with it. See here for some details: #91 |
Oh sorry gave you wrong info. Was working on something else. |
After many try this configuration working for me. Create an API Key on Kuma [Uptime Kuma Integration] |
I tried and it created integration. I just used homeassistant.local. |
In your case you need to use homeassistant.local because you are running the Home Assistant uptime kuma add-on inside of Home Assistant itself. |
I'm not running addon, I'm running uptime kuma in docker container. And everything else for that matter. I can stop homeassistant container and uptime kuma is.. up with all 47 monitors. |
Then in that case I have no clue. There is some weird networking issue I suppose.HomeAssistant.local Couldn't possibly work if Uptime Kuma is not even running on that machine. |
Everything is running on the same machine. 31 container. I use https on local network. I know it is wired unnecessary etc. but this is how I set things up. Was just checking containers and glances container is running in network mode host and I can connect integration using ssl. Others like frigate, adguard or uptime kuma have mapped ports and this is a bridge mode if I got docker networking correctly. As this was working fine before I presume that something has been changed in home assistant that this isn't working anymore. |
I solve it. The problem was dns settings on my debian machine. Probably years back I set up 1.1.1.1 nameserver. When I done curl -v https://frigate.myserver.com it tried to access it over my public ip, but containers can't be accessed over the net. And that was the reason I coudn't set up integrations using mysubdomain over ssl. |
Thanks for following up 👍 |
I had the custom Uptime Kuma integration from HACS running and from one day to another it stopped. I reinstalled it and when I enter my uptime Kuma credentials (ip, port, user etc.) it says „Failed to connect“ I set correctly to ignore SSL and added http:// in front of the IP (as before). Uptime Kuma is running and I can access it via the IP
I also tried to set another Uptime Kuma instance which I was able to integrate and had it running for 2 hour and then the integration stopped working while the Kuma instance itself works flawlessly. Trying to reconnect I get the same error as with the other instance.
The text was updated successfully, but these errors were encountered: