Closed grmelacz closed 2 years ago
Thanks for reporting! I share your hypothesis, I've seen many weird errors show up in different applications since Ukraine conflict. Tomorrow I might have some time to look at it.
CC: @misncz
I do not know if this is anyhow related, but I am getting those errors lately.. Sometimes the Homebridge is restored, but sometimes it just crashes the Raspi and I need to restart (turn on) manually.
[3/25/2022, 9:55:26 AM] [Jablotron] Error: getaddrinfo EAI_AGAIN api.jablonet.net [3/25/2022, 9:56:26 AM] [Jablotron] Error: getaddrinfo EAI_AGAIN api.jablonet.net [3/25/2022, 9:57:26 AM] [Jablotron] Error: getaddrinfo EAI_AGAIN api.jablonet.net [3/25/2022, 9:58:26 AM] [Jablotron] Error: getaddrinfo EAI_AGAIN api.jablonet.net [3/25/2022, 9:58:32 AM] Error: send ENETUNREACH 224.0.0.251:5353 at doSend (node:dgram:722:16) at defaultTriggerAsyncIdScope (node:internal/async_hooks:465:18) at afterDns (node:dgram:668:5) at processTicksAndRejections (node:internal/process/task_queues:84:21) [3/25/2022, 9:58:32 AM] Error: send ENETUNREACH 224.0.0.251:5353 at doSend (node:dgram:722:16) at defaultTriggerAsyncIdScope (node:internal/async_hooks:465:18) at afterDns (node:dgram:668:5) at processTicksAndRejections (node:internal/process/task_queues:84:21) [3/25/2022, 9:58:32 AM] Got SIGTERM, shutting down Homebridge...
Thank you for nay help, Martin
I'm getting EAI_AGAIN too. I thought it was my connection/network-related.
[25. 3. 2022 10:16:33] [Jablotron] Error: getaddrinfo EAI_AGAIN api.jablonet.net
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'api.jablonet.net'
}
Another frequent error is this one:
[26. 3. 2022 4:40:07] [Jablotron] Error: Method not supported by Jablotron
at /usr/lib/node_modules/homebridge-jablotron/lib/jablotron-client.js:33:31
at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:21)
at IncomingMessage.emit (node:events:532:35)
at endReadableNT (node:internal/streams/readable:1346:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I have followed my logs over the last couple of days and don't see any errors. EAI_AGAIN
is a DNS lookup error, might be ISP related?
We can implement a catch for EAI_AGAIN
but I would like to know what the cause is.
They all are very likely ISP provider related - something with DNS and/or local network
Yes, I thought so. Other plugins have that probably sorted out as this one is the only one reporting this error. I got only API timeouts/bad gateways from other ones.
Other plugins don’t need to call remote server like this one. That is very likely why you don’t see them. As @fdegier said we might improve handling of these but it will just mask out the issue itself
I finally logged some errors too:
[3/30/2022, 4:40:20 AM] [Jablotron] Error: Method not supported by Jablotron
at /homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:33:31
at IncomingMessage.<anonymous> (/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:21)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[3/30/2022, 4:40:20 AM] [Jablotron] Error: Method not supported by Jablotron
at /homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:33:31
at IncomingMessage.<anonymous> (/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:21)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[3/30/2022, 5:08:39 AM] [Homebridge UI] Starting terminal session
[3/30/2022, 5:09:25 AM] [Homebridge UI] Terminal session ended.
[3/30/2022, 6:05:01 AM] [Jablotron] Error: SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at IncomingMessage.<anonymous> (/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:42)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[3/30/2022, 6:05:01 AM] [Jablotron] Unable to parse JSON data: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
We should add handling for these - they indicate issue on server (Jablotron cloud) itself and there's nothing we could do about them. We can ignore/skip them only and wait for next successfull iteration (call to the server)
Ideally we should be checking response codes and proceed further if it was 200 (OK) only
Yes 100%, I think we can add 2 types of handlers but maybe we that overthinking it.
I'll see what I can do. I first need to fix my entire Homebridge setup as it just stopped responding completely.
Ok so I went through the reported errors, they are actually being handled, I made a diff with more explicitly noting that we are actively handling them.
The errors reported in this issue are all network related, either Jablotron, ISP or users. Very unfortunate but nothing we really can do about that, we can mask them in the plugin but I'm not comfortable with withholding that information from users.
Hi, recently I'm getting quite a lot invalid responses to Jablotron API queries. I suspect it might be connected with the fact Jablotron cut out Russia and they might be attacking their servers.
Anyway, some of the problems that happen quite often follow:
or
and
These appear to be not handled properly. Could you please update the plugin to handle these errors too?