Skip to content
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

[BUG] statusCheck on specific URL returns ENOTFOUND error #251

Closed
4 tasks done
jhelmink opened this issue Sep 27, 2021 · 6 comments
Closed
4 tasks done

[BUG] statusCheck on specific URL returns ENOTFOUND error #251

jhelmink opened this issue Sep 27, 2021 · 6 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working

Comments

@jhelmink
Copy link

Environment

Self-Hosted (Docker)

Version

1.8.3

Describe the problem

statusCheckUrl: http://homeassistant.local:4357/
returns
Service Unavailable: homeassistant.local resulted in ENOTFOUND (-3008)

I was unable to manually check the ping command using my local dashy instance
http://192.168.1.190:8080/ping?url=https%3A%2F%2Fgoogle.com
returns
Cannot GET /ping

Not sure if it's not parsing my URL correctly and/or I'm not manually testing the ping command properly to see the problem.

Additional info

image

Please tick the boxes

@jhelmink jhelmink added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Sep 27, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Sep 27, 2021

Heya,

So part of this is my fault, I just realized that there's an error I made in the docs (fixed it now in 8d8a362) - I recently renamed the /ping endpoint to /status-check.

Do you think you could try manually checking the status again, and share the output for a known online site (like Google), and then also for your local site, e.g:
http://192.168.1.190:8080/?&url=https%3A%2F%2Fgoogle.com
http://localhost:4000/status-check/?&url=http%3A%2F%2Fhomeassistant.local%3A4357%2F

Is it only this one app that's not working, or everything? Do you have any custom authentication service sitting in front of your Home Assistant? And is it a self-signed certificate, or non-SSL?

@Lissy93 Lissy93 added the 🚏 Awaiting User Response [ISSUE] Response from original author is pending label Sep 29, 2021
@jhelmink
Copy link
Author

jhelmink commented Oct 3, 2021

Hey Lissy,

http://192.168.1.190:8080/status-check/?&url=https%3A%2F%2Fgoogle.com
returns
{"statusCode":200,"statusText":"OK","serverName":"www.google.com","successStatus":true,"timeTaken":751,"message":"✅ www.google.com responded with 200 - OK. \n��Took 751 ms"}
Looks like some encoding issues in the response, but it works :)
Status checks for my other services are fine.

Side note: Weird to me that you need to have ...status-check/?&url=... in the URL after the status check for this to work.
Why couldn't it just be ...status-check?url=... for the single parameter?

Anyway pinging the HA Observer;
http://192.168.1.190:8080/status-check/?&url=http%3A%2F%2Fhomeassistant.local%3A4357
returns
{"successStatus":false,"message":"� Service Unavailable: homeassistant.local resulted in ENOTFOUND (-3008)"}
So that is what I'm seeing in the dashy UI.

Check the network status for the request it is parsing the parameter correctly;
image

I have no authentication in front of the homeassistant instance, and no SSL.
I tried the HA UI endpoint too /lovelace/ but that produces the same error.

The error message ENOTFOUND looks like a Node.js URL parsing failure from what I can tell.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 🚏 Awaiting User Response [ISSUE] Response from original author is pending labels Oct 3, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Oct 3, 2021

Possibly try adding a trailing slash? Browsers are pretty good at resolving websites in any format, but Node.js is less so.

I've tried everything to recreate this on my home assistant service, but with no luck. If the endpoint is working with Postman, then it's not an issue with the server, and most likely something in your config. So I'm not sure that there's much more I can do to help with this.

@Lissy93 Lissy93 closed this as completed Oct 3, 2021
@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Oct 3, 2021
@jhelmink
Copy link
Author

jhelmink commented Oct 4, 2021

homeassistant.local was returning an IP6 address when pinging, so I think it's due to that.
I just switched to the IP4 IP address instead and it's working fine :)

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Oct 4, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Oct 4, 2021

Nice, glad you got it working :)
There's definatley plenty of room for improvement for the status checking functionality, I did try to implement the option for a ping-only status check (PR: #233), but wasn't possible to do it with Node.js alone. At some point I will start re-writting this in Go, which should be a lot more reliable.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Oct 4, 2021
@House079
Copy link

I have the same problem. I put direct address in status check url, but it is the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working
Projects
None yet
Development

No branches or pull requests

4 participants