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.