Help with Telegram integration error

I am getting an RequestError: Error: getaddrinfo ENOTFOUND api.telegram.org when trying to set u to run on boot. It all works ok if I start it manually. Any suggestions?. I have a Telegram bot integration to send me a message when an event occurs.

❯ which node-red
/opt/homebrew/bin/node-red
❯ pm2 start /opt/homebrew/bin/node-red -- -v
[PM2] Applying action restartProcessId on app [node-red](ids: [ 0 ])
[PM2] [node-red](0) ✓
[PM2] Process successfully started
┌─────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name         │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 1   │ .node-red    │ default     │ 0.0.1   │ fork    │ N/A      │ 0      │ 15   │ stopped   │ 0%       │ 0b       │ server   │ disabled │
│ 0   │ node-red     │ default     │ N/A     │ fork    │ 53410    │ 0      │ 75   │ stopped   │ 0%       │ 0b       │ server   │ disabled │
└─────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
❯ pm2 logs node-red
[TAILING] Tailing last 15 lines for [node-red] process (change the value with --lines option)
/Users/server/.pm2/logs/node-red-error.log last 15 lines:
0|node-red | RequestError: Error: getaddrinfo ENOTFOUND api.telegram.org
0|node-red |     at new RequestError (/Users/server/.node-red/node_modules/request-promise-core/lib/errors.js:14:15)
0|node-red |     at Request.plumbing.callback (/Users/server/.node-red/node_modules/request-promise-core/lib/plumbing.js:87:29)
0|node-red |     at Request.RP$callback [as _callback] (/Users/server/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
0|node-red |     at self.callback (/Users/server/.node-red/node_modules/request/request.js:185:22)
0|node-red |     at Request.emit (node:events:526:28)
0|node-red |     at Request.onRequestError (/Users/server/.node-red/node_modules/request/request.js:877:8)
0|node-red |     at ClientRequest.emit (node:events:526:28)
0|node-red |     at TLSSocket.socketErrorListener (node:_http_client:442:9)
0|node-red |     at TLSSocket.emit (node:events:526:28)
0|node-red |     at emitErrorNT (node:internal/streams/destroy:164:8)
0|node-red |     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
0|node-red |     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
0|node-red |   code: 'EFATAL'
0|node-red | }

/Users/server/.pm2/logs/node-red-out.log last 15 lines:
0|node-red | 1 Mar 11:50:53 - [info] Projects directory: /Users/server/.node-red/projects
0|node-red | 1 Mar 11:50:53 - [info] Server now running at http://127.0.0.1:1880/
0|node-red | 1 Mar 11:50:53 - [info] Active project : Dragonframe_Heartbeat_Server
0|node-red | 1 Mar 11:50:53 - [info] Flows file     : /Users/server/.node-red/projects/Dragonframe_Heartbeat_Server/flow.json
0|node-red | 1 Mar 11:50:53 - [info] Starting flows
0|node-red | 1 Mar 11:50:53 - [info] Started flows
0|node-red | 1 Mar 11:50:53 - [info] [udp in:Pantry Camera Port 65519] udp listener at 0.0.0.0:65519
0|node-red | 1 Mar 11:50:53 - [info] [udp in:Trade Floor Camera Port 65515] udp listener at 0.0.0.0:65515
0|node-red | 1 Mar 11:53:36 - [info] Stopping modified nodes
0|node-red | 1 Mar 11:53:43 - [info] Stopped modified nodes

I have three Node-Red integrations on three different computers communicating to a single Telegram bot notifying me different status for each computer throughout the day.

Are you connecting via wifi? Perhaps node-red starts up before the network is ready.

What happens when you wait a few minutes? The Telegram node poles every few minutes

I don't use pm2, but is that a fatal error that kills node-red? If so are you using the latest versions of node-red and the telegram node, and also a valid nodejs version? You can check that using node -v, which should preferably be 14 or 16. 12 should also work but it is nearly out of support so best avoided.

WiFi disabled. Connected via ethernet.

Nothing happens until I start Node-Red manually

I guess it is a fatal error?. Not sure hot to tell. I am using latest versions of everything. Using node v17.7.1. Should I be using node v16?.

https://nodered.org/docs/faq/node-versions

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.