Aietes / node-red-contrib-harmony

Node-RED integration for Harmony hub
MIT License
15 stars 18 forks source link

Crashes Node-Red #3

Closed citrusfizz closed 7 years ago

citrusfizz commented 7 years ago

I have two different H Activity's in a flow. If i make any deployments to any flow (doesn't have to the one that contains the harmony nodes) it will crash Node-red after about 5-6 consecutive deployments. Even moving the position on a node slightly and doing a deploy will crash with the below error.

This is reproducible and i can grab any other information that you may need.

just an FYI, I have a node that utilizes libpcap (amazon-dash) and therefor i need to run Node-Red as root

29 Mar 14:42:24 - Error: MAX_CLIENTS=6 at Connection.onStanza (/root/.node-red/node_modules/node-red-contrib-harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:355:17) at StreamParser. (/root/.node-red/node_modules/node-red-contrib-harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/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. (/root/.node-red/node_modules/node-red-contrib-harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/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 (/root/.node-red/node_modules/node-red-contrib-harmony/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/root/.node-red/node_modules/node-red-contrib-harmony/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/root/.node-red/node_modules/node-red-contrib-harmony/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:123:17)

29 Mar 14:42:37 - [info] Node-RED version: v0.16.2 29 Mar 14:42:37 - [info] Node.js version: v6.10.0 29 Mar 14:42:37 - [info] Linux 3.16.0-4-amd64 x64 LE 29 Mar 14:42:38 - [info] Loading palette nodes

Aietes commented 7 years ago

This issue is related to an issue in the dependent library. As the node is redeployed, a new connection is being opened, unfortunately there is an error on more than 6 connections to the harmony hub. I can't catch or handle this error, without changes to the dependent library. I'll look into a workaround, to see if I can mitigate the issue.

Aietes commented 7 years ago

Well, I'm now closing the connection with on every node close, which prevents this error. I should have done this to begin with, thank you for finding this error! I released a new version 1.0.7 on npm containing the fix.

citrusfizz commented 7 years ago

Awesome. Hella Fast turn around. Thanks for looking into this, and even more thanks for fixing it!!!

I'll test it now