Telegram bot crashes nodered on startup, if internet is lost
slev1n opened this issue · 10 comments
hi,
I had an internet outage yesterday. Unfortunately nodered crashed also because of telegram bot:
`
Log-Größe: 737.6 KB
Zeit | Nachricht | ||
---|---|---|---|
node-red.0 | 2024-05-23 00:27:45.370 | error | Exception-Code: EFATAL: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org |
node-red.0 | 2024-05-23 00:27:45.369 | error | RequestError: Error: getaddrinfo EAI_AGAIN api.telegram.org at new RequestError (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/opt/iobroker/iobroker-data/node-red/node_modules/request/request.js:185:22) at Request.emit (node:events:513:28) at Request.onRequestError (/opt/iobroker/iobroker-data/node-red/node_modules/request/request.js:877:8) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) |
node-red.0 | 2024-05-23 00:27:45.368 | error | unhandled promise rejection: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org |
node-red.0 | 2024-05-23 00:27:45.367 | error | Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). |
node-red.0 | 2024-05-23 00:27:45.365 | error | Node-RED: 23 May 00:27:45 - [error] [telegram sender:ac723b10.a88c78-9715c9ce.86b508] Caught exception in sender node: Error: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org when |
node-red.0 | 2024-05-23 00:27:44.987 | error | Exception-Code: EFATAL: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org |
node-red.0 | 2024-05-23 00:27:44.986 | error | RequestError: Error: getaddrinfo EAI_AGAIN api.telegram.org at new RequestError (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/opt/iobroker/iobroker-data/node-red/node_modules/request/request.js:185:22) at Request.emit (node:events:513:28) at Request.onRequestError (/opt/iobroker/iobroker-data/node-red/node_modules/request/request.js:877:8) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) |
node-red.0 | 2024-05-23 00:27:44.986 | error | unhandled promise rejection: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org |
node-red.0 | 2024-05-23 00:27:44.985 | error | Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). |
Hm I will try to reproduce it
please try with new version 16.0.0
@slev1n I could not reproduce it under windows.
On what hardware do you run node red? what node-red version ? what nodejs version?
@windkh Im on raspy 4 with Debian,
node-red (v 3.1.4) is managed via iobroker
nodejs v16.13.0
Update to 16.0.1 did not resolve the error:
`node-red.0
2024-07-02 22:24:32.813 error Exception-Code: EFATAL: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org
node-red.0
2024-07-02 22:24:32.813 error RequestError: Error: getaddrinfo EAI_AGAIN api.telegram.org at new RequestError (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/opt/iobroker/iobroker-data/node-red/node_modules/@cypress/request/request.js:183:22) at Request.emit (node:events:513:28) at Request.onRequestError (/opt/iobroker/iobroker-data/node-red/node_modules/@cypress/request/request.js:869:8) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21)
node-red.0
2024-07-02 22:24:32.812 error unhandled promise rejection: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org
node-red.0
2024-07-02 22:24:32.811 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
node-red.0
2024-07-02 22:24:32.809 error Node-RED: 2 Jul 22:24:32 - [error] [telegram sender:ac723b10.a88c78-9715c9ce.86b508] Caught exception in sender node:
Error: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org
when processing message:
{"payload":{"chatId":914678011,"type":"message","content":"-> false","options":{"chat_id":914678021,"text":"-> false"}},"_msgid":"18497aea960df2116"}
node-red.0
2024-07-02 22:24:32.377 error Exception-Code: EFATAL: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org
node-red.0
2024-07-02 22:24:32.376 error RequestError: Error: getaddrinfo EAI_AGAIN api.telegram.org at new RequestError (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/opt/iobroker/iobroker-data/node-red/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/opt/iobroker/iobroker-data/node-red/node_modules/@cypress/request/request.js:183:22) at Request.emit (node:events:513:28) at Request.onRequestError (/opt/iobroker/iobroker-data/node-red/node_modules/@cypress/request/request.js:869:8) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21)
node-red.0
2024-07-02 22:24:32.376 error unhandled promise rejection: EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org
node-red.0
2024-07-02 22:24:32.375 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().`
Thanks for the info... I will try to analyze it.
@slev1n if you can reproduce it, then please add a catch node to the flow that is connected to a debug node. I want to know if that avoids node red from crashing
@slev1n please install next version which comes up in a few minutes and let me know if it changed anything
closed du to inactivity