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] Socket closed #361

Closed
jahnkenneth opened this issue Mar 25, 2021 · 12 comments
Closed

[BUG] Socket closed #361

jahnkenneth opened this issue Mar 25, 2021 · 12 comments
Assignees
Labels
bug Something isn't working waiting for feedback Waiting for feedback from users

Comments

@jahnkenneth
Copy link

I am getting the following errors.
Am using Hoobs.

25.3.2021, 01:06:34 [Stuehub] (Stuehub)ERROR (1)- refreshCurrentActivity Error: WebSocket closed with reason: undefined (undefined). - Stack : Error: WebSocket closed with reason: undefined (undefined).
at WebSocketAsPromised._handleClose (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:353:19)
at WebSocket.listener (/home/hoobs/.hoobs/node_modules/websocket-as-promised/src/index.js:311:64)
at WebSocket.emit (events.js:315:20)
at WebSocket.emitClose (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:198:10)
at Receiver.receiverOnFinish (/home/hoobs/.hoobs/node_modules/harmony-websocket/node_modules/ws/lib/websocket.js:815:20)
at Receiver.emit (events.js:315:20)
at finish (internal/streams/writable.js:657:10)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
25.3.2021, 01:06:34 [Stuehub] (Stuehub)WARNING - socket closed
25.3.2021, 01:06:54 [Stuehub] (Stuehub)ERROR (2)- refreshCurrentActivity TimeoutError: Can't open WebSocket within allowed timeout: 10000 ms. - Stack : TimeoutError: Can't open WebSocket within allowed timeout: 10000 ms.
at PromiseController._handleTimeout (/home/hoobs/.hoobs/node_modules/promise-controller/src/index.js:172:19)
at Timeout. (/home/hoobs/.hoobs/node_modules/promise-controller/src/index.js:178:43)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)

Config
Your config section of platform. Please do not post your whole config and especially with logins / passwords !

Additional context

@jahnkenneth jahnkenneth added the bug Something isn't working label Mar 25, 2021
@jahnkenneth
Copy link
Author

25.3.2021, 13:42:05 [Stuehub] (Stuehub)ERROR (3)- refreshCurrentActivity TimeoutError: Can't open WebSocket within allowed timeout: 10000 ms. - Stack : TimeoutError: Can't open WebSocket within allowed timeout: 10000 ms.
at PromiseController._handleTimeout (/home/hoobs/.hoobs/node_modules/promise-controller/src/index.js:172:19)
at Timeout. (/home/hoobs/.hoobs/node_modules/promise-controller/src/index.js:178:43)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
25.3.2021, 13:42:14 Error: connect EHOSTUNREACH 192.168.68.113:8088
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
25.3.2021, 13:42:14 Got SIGTERM, shutting down Bridge...
25.3.2021, 13:42:14 [Stuehub] INFO - shutdown
25.3.2021, 13:42:14 [Stuehub] INFO - shutdown

@SvenKempf
Copy link

I can confirm to have the very same issue.
I was using it with hoobs version 3.3.5
I meanwhile had to remove the module entirely because it caused my hoobs to completely crash at least once a day :-(

@nicoduj
Copy link
Owner

nicoduj commented Mar 27, 2021

Hi, Did you check with Hoobs support ? I have no such issue reported on regular homebridge, might be some problem with websockrets / hoobs itself. no error on the plugin side from the error stack I see.

@SvenKempf
Copy link

I did not yet contact hoobs support because so far to me it looked obvious that the issue was caused by harmony plugin.
What brings me to this is this log entry:
Mar 27 08:19:49 hoobs hoobs[12903]: [HarmonyHub] (HarmonyHub)ERROR (2)- refreshC urrentActivity TimeoutError: Can't open WebSocket within allowed timeout: 600 ms . - Stack : TimeoutError: Can't open WebSocket within allowed timeout: 600 ms. Mar 27 08:19:49 hoobs hoobs[12903]: at PromiseController._handleTimeout (/ho me/hoobs/.hoobs/node_modules/promise-controller/src/index.js:172:19) Mar 27 08:19:49 hoobs hoobs[12903]: at Timeout.<anonymous> (/home/hoobs/.hoo bs/node_modules/promise-controller/src/index.js:178:43) Mar 27 08:19:49 hoobs hoobs[12903]: at listOnTimeout (internal/timers.js:531 :17) Mar 27 08:19:49 hoobs hoobs[12903]: at processTimers (internal/timers.js:475 :7) Mar 27 08:21:28 hoobs hoobs[12903]: Error: connect ETIMEDOUT 192.168.178.59:8088 Mar 27 08:21:28 hoobs hoobs[12903]: at TCPConnectWrap.afterConnect [as oncom plete] (net.js:1134:16) Mar 27 08:21:28 hoobs hoobs[12903]: Error: connect ETIMEDOUT 192.168.178.59:8088 Mar 27 08:21:28 hoobs hoobs[12903]: at TCPConnectWrap.afterConnect [as oncom plete] (net.js:1134:16) Mar 27 08:21:28 hoobs hoobs[12903]: Got SIGTERM, shutting down Bridge... Mar 27 08:21:28 hoobs hoobs[12903]: [HarmonyHub] INFO - shutdown Mar 27 08:21:28 hoobs hoobs[12903]: [HarmonyHub] INFO - shutdown

@jahnkenneth
Copy link
Author

I ditched Hoobs and converted to Homebridge. No problems. :-)

@nicoduj
Copy link
Owner

nicoduj commented Mar 27, 2021

the plugin can't open a websocket, maybe because ports on the system are blocked or already in use. Can't do anything about that. It is either network related or a conflict with the host.

I have already seen such error on hoobs, but don't really know what thez are doing above homebridge ....

@SvenKempf
Copy link

OK - I will open an incident on hoobs as well.
If they can't help as well I will have to keep harmony plugin removed

@nicoduj
Copy link
Owner

nicoduj commented Mar 27, 2021

Or move to regular homebridge 😀

@SvenKempf
Copy link

Not an option. Way to much manually maintenance required. This installation was rock solid for over a year now.

@NorbertM21
Copy link

Same issue here without Hoobs:

Several times a day just "socket closed":
[29.3.2021, 21:11:56] [Harmony] (Harmony)WARNING - socket closed

Sometimes with the following messages
[29.3.2021, 21:12:06] [Harmony] (Harmony)ERROR (1)- refreshCurrentActivity Error: WebSocket closed with reason: undefined (undefined). - Stack : Error: WebSocket closed with reason: undefined (undefined).
at WebSocketAsPromised._handleClose (/usr/local/lib/node_modules/homebridge-harmony/node_modules/websocket-as-promised/src/index.js:353:19)
at WebSocket.listener (/usr/local/lib/node_modules/homebridge-harmony/node_modules/websocket-as-promised/src/index.js:311:64)
at WebSocket.emit (events.js:315:20)
at WebSocket.emitClose (/usr/local/lib/node_modules/homebridge-harmony/node_modules/ws/lib/websocket.js:188:12)
at ClientRequest. (/usr/local/lib/node_modules/homebridge-harmony/node_modules/ws/lib/websocket.js:580:15)
at ClientRequest.emit (events.js:315:20)
at Socket.socketErrorListener (_http_client.js:469:9)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
[29.3.2021, 21:12:06] [Harmony] (Harmony)WARNING - socket closed

@nicoduj nicoduj added the waiting for feedback Waiting for feedback from users label Apr 20, 2021
@NorbertM21
Copy link

Looks like solved.
Just about three messages "socket close" per day (without Hoobs).
Thanks for your support.

@nicoduj
Copy link
Owner

nicoduj commented Apr 26, 2021

Looks like solved.

Just about three messages "socket close" per day (without Hoobs).

Thanks for your support.

Thank you for reporting. If you still have socket close, it means your hub becomes unreachable at some point but it can reconnect so that was my main concern.

@nicoduj nicoduj closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for feedback Waiting for feedback from users
Projects
None yet
Development

No branches or pull requests

4 participants