-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
httpcheck do not accept URLs that do not end with com #3656
Comments
I don't think this has anything to do with the TLD the URL points to. Both google.ru and mail.ru are in Russian (as obviously implied by the .ru TLD) encoded in UTF-8. The byte indexes those error messages reference are the first times I can find in both pages where a Unicode character with a codepoint above 127 appears, and the decoder being used by httpcheck is therefore choking on the bytes above 127. I can produce similar error messages by pointing it at other sites where the main content is not in English, even if they are in a .com or .net TLD. I think it's pretty likely that this could be fixed by just updating things to detect the encoding from the Content-Type header, but I defer to @ccremer on that as he's the one who wrote the plugin and therefore probably has a far better understanding of what it's doing than I do. |
The problem most likely lies in the UrlService, as #3645 tries to fix (or did fix) #3641 . Personally I think the bug has just moved, since I had issues with the decode() method before (that's why I did't use decode() in the Can you find and edit
I currently don't have a running netdata instance at hand... |
Change file
and restart netdata still leads to errors in the log:
|
Well, that's the source file. Did you actually run the re-install script? Because the python source file usually gets installed in How productive is your machine? It's possible that this "little change" might break other plugins that rely on the UrlService. To be on the safe side, please use a test machine. |
Oh, sorry.
Now looks good. I see all healthchecks in netdata web-interface. |
Glad to see that :) @l2isbad What's the reason for the decode() method? AFAIK it's only brought problems... |
@ccremer py3 response.data is bytes, not string. We have to add https://eli.thegreenplace.net/2012/01/30/the-bytesstr-dichotomy-in-python-3 |
As a quick fix we can only decode if |
actually |
so, is this still buggy? |
My problem doesn't reproduce anymore after latest updates. Thx. |
Hi guys,
And my log is :
|
i added a fix in #7601 |
I can confirm that your fixes workes for all my URL's. |
@a-camacho the fix is merged |
Thanks ! |
Steps to reproduce:
restart netdata and view log:
but if i try add this domains:
got errors:
Versions:
The text was updated successfully, but these errors were encountered: