homebridge-harmonyhub icon indicating copy to clipboard operation
homebridge-harmonyhub copied to clipboard

Crashing HomeBridge after about 20 mins

Open livefeed opened this issue 7 years ago • 13 comments

Crashing HomeBridge after about 20 mins, any ideas? Thanks.

xmpp:connection use lazy socket +0ms xmpp:connection setup stream +0ms xmpp:connection send: <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" to="connect.logitech.com"> +11ms xmpp:connection receive: </stream:stream> +67ms xmpp:connection receive: <stream:stream from='[email protected]' to='ab903454-7bee-4410-9eea-bb5355bb667e' version='1.0' id='connection-failure' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>stream:errorMAX_CLIENTS=6</stream:error></stream:stream> +1ms events.js:160 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:355:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:226:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:188:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:58:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:188:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:123:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:305:17) at emitOne (events.js:101:20) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:548:20)

livefeed avatar Jan 23 '17 01:01 livefeed

I'm getting a similar crash. The Harmony plugin seems to take my homebridge down all the time. :(

VeniceNerd avatar Jan 26 '17 20:01 VeniceNerd

I'm getting the same issue. Has anybody figured it out yet?

events.js:160 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:355:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:226:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:188:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:58:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:188:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:123:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:305:17) at emitOne (events.js:101:20) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:551:20)

RossGGG avatar Jan 31 '17 01:01 RossGGG

See https://github.com/KraigM/homebridge-harmonyhub/issues/74, https://github.com/KraigM/homebridge-harmonyhub/issues/31

FYI I had the same issue and finally resorted to using a script that relaunches homebridge as soon as it crashes.

le-fractal avatar Jan 31 '17 13:01 le-fractal

Yup, same here:

events.js:161 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:355:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:226:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:189:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:58:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:189:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:123:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:305:17) at emitOne (events.js:101:20) at Socket.emit (events.js:189:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:551:20)

frankea avatar Feb 09 '17 18:02 frankea

I am getting the same error - crashing regularly. Is anyone actively working on this?

events.js:160 throw er; // Unhandled 'error' event Error: MAX_CLIENTS=6 at Connection.onStanza (/home/pi/.npm-global/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:355:17) at StreamParser. (/home/pi/.npm-global/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:226:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:188:7) at SaxLtx. (/home/pi/.npm-global/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:58:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:188:7) etc, etc....

ToddGreenfield avatar Mar 21 '17 20:03 ToddGreenfield

Hello Kraigm,

I'm using your Harmony plugin with pleasure. But I have the same problem. Is there any update in the schedule? The Harmony plugin always causes the Homebridge to stop. He always indicates that too many plugins are running. I have a script that starts the homebridge again. But it would be nice if this could be rectified.

Thank you again for your nice plugin

Freakymv avatar May 22 '17 19:05 Freakymv

I had the same issue. I fixed it by handling the exceptions thrown by events.js. I'm still not sure the cause of the exception, but this solution seems to be working for me.

c7791fadda2a4290020dcf0bea075e5231b045f8

nibty avatar Jul 05 '17 22:07 nibty

The handling of the exception should stop the homebridge from crashing, but does the plugin reconnect itself? What is causing the error exactly?

DanielWeeber avatar Aug 02 '17 16:08 DanielWeeber

The error appears to be caused by the hub itself - see the larger issue #31 - there are other threads talking about this issue as well. A workaround for this error is to reset/unplug the hub, then restart homebridge. I accomplished this by plugging the hub into a zwave outlet and having it switch off/on around 3am every day. Then I use a systemd.timer to restart my homebridge service. Been working with no issues for months now using two hubs.

@nibty I am curious if your code fix still allows a successful connection to the hub since it appears the problem is with the hub, and not just continually catching the errors.... ?

ToddGreenfield avatar Aug 03 '17 01:08 ToddGreenfield

Is this still an issue? I'm looking to purchase the hub but only if it doesnt crash

dpyy avatar Oct 27 '17 06:10 dpyy

I got this error still today, looks like a script to restart homebridge is the only solution?

Running hass.io (latest) homebridge from hass.io (2.1.1) homebridge-harmonyhub 0.3.0-alpha.2

dasam avatar Nov 12 '17 10:11 dasam

@dasam would you mind helping me figure out how to insert this plugin into hass.io? I thought I did it right but I kept getting errors and it never worked. I couldn't find a detailed tutorial on how to insert these plugins into hass.io

matchmee avatar Nov 17 '17 05:11 matchmee

@matchmee sure. Just add the hub to your config.json

{ "platform": "HarmonyHub", "name": "Harmony Hub" }

and in the hass.io config in the webinterface for homebridge:

{ "log_level": "info", "avahi_interfaces": "", "avahi_hostname": "", "avahi_domainname": "local", "enable_ipv6": true, "packages": [], "init_commands": [], "plugins": [ "homebridge-telldus", "homebridge-harmonyhub" ] } That is what i have at least.

dasam avatar Nov 18 '17 12:11 dasam