RaimondB / node-red-contrib-nefit-easy

Nefit Easy™ Node-RED Node
MIT License
2 stars 1 forks source link

XMPP authentication failure crashing node-red #237

Closed nachtbraker closed 3 years ago

nachtbraker commented 3 years ago

Hello,

Using node-red-contrib-nefit-easy2 v2.1.2. During the last week this has happened a few times and has crashed node-red:

16 Aug 11:41:10 - [error] [nefit-easy:Flow Temperature] Nefit Command flow-temperature : Error: MAX_RETRIES_REACHED 16 Aug 11:44:02 - [error] [nefit-easy:Get Status] Nefit Command status : Error: MAX_RETRIES_REACHED 16 Aug 11:44:02 - [error] [nefit-easy:Get Status] Nefit Command status : Error: MAX_RETRIES_REACHED 16 Aug 11:44:22 - [error] [nefit-easy:Get Boiler Statuscode] Nefit Command display-code : XMPP authentication failure 16 Aug 11:44:22 - [error] [nefit-easy:Get Boiler Statuscode] Nefit Command display-code : XMPP authentication failure 16 Aug 11:44:28 - [red] Uncaught Exception: 16 Aug 11:44:28 - Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('XMPP authentication failure') at Client.emit (events.js:365:17) at Client._handleAuthState (/usr/home/nodered/.node-red/node_modules/node-xmpp-client/lib/Client.js:295:10) at Client._handleStanza (/usr/home/nodered/.node-red/node_modules/node-xmpp-client/lib/Client.js:233:12) at Client.onStanza (/usr/home/nodered/.node-red/node_modules/node-xmpp-client/lib/Client.js:221:8) at Connection.emit (events.js:376:20) at Connection.onStanza (/usr/home/nodered/.node-red/node_modules/node-xmpp-core/lib/Connection.js:377:10) at StreamParser. (/usr/home/nodered/.node-red/node_modules/node-xmpp-core/lib/Connection.js:231:10) at StreamParser.emit (events.js:376:20) at SaxLtx. (/usr/home/nodered/.node-red/node_modules/@xmpp/streamparser/index.js:69:14) at SaxLtx.emit (events.js:376:20) at SaxLtx._handleTagOpening (/usr/home/nodered/.node-red/node_modules/ltx/lib/parsers/ltx.js:40:12) at SaxLtx.write (/usr/home/nodered/.node-red/node_modules/ltx/lib/parsers/ltx.js:159:18) at StreamParser.write (/usr/home/nodered/.node-red/node_modules/@xmpp/streamparser/index.js:134:17) at Connection.onData (/usr/home/nodered/.node-red/node_modules/node-xmpp-core/lib/Connection.js:310:17) at TLSSocket.emit (events.js:388:22) at addChunk (internal/streams/readable.js:309:12) 1: 0x15772c0 node::Abort(void) [/usr/local/bin/node] 2: 0x154ae80 node::PlatformInit(void) [/usr/local/bin/node] 3: 0x1549e10 node::InitializeOncePerProcess(int, char) [/usr/local/bin/node] 4: 0x154a3d9 node::Start(int, char) [/usr/local/bin/node]

The odd thing is that I hadn't touched anything recently in my node-red setup. I'm requesting data every 2 minutes which has worked well over the last year or so without any errors.

But in any case, an error like this should not take down the whole node-red system, right?

Ben

RaimondB commented 3 years ago

I thought I already responded, but apparently not.. Do you still have the issue? In general, I think node-red itself should be protected against uncaught exceptions. So maybe good to also raise this issue on node-red itself.

Looking at the earlier loglines, the errors are being catched (at least at first) by the node in my library. And that after a certain amount of errors node-red fails. So I am not sure if i am able to do something against this.

XMPP authentication failure mostly has to do with incorrect configuration of credentials.

RaimondB commented 3 years ago

@nachtbraker do you still have issues? otherwise I'll close this one.

nachtbraker commented 3 years ago

@nachtbraker do you still have issues? otherwise I'll close this one.

No, without changing anything, it has been stable again lately. Thanks for looking into it.