Node-Red Crashes on Startup

I installed Node-Red, all the modules I need, and created a basic flow. I then created an image of the SD card and wrote it to several other SD cards to deploy in the field. Everything starts fine on some Pis but not on others, even in safe mode. I searched the forums but didn't find any answers that seem to apply.

Welcome to Node-RED
===================

14 Apr 10:29:36 - [info] Node-RED version: v3.0.2
14 Apr 10:29:36 - [info] Node.js  version: v16.19.1
14 Apr 10:29:36 - [info] Linux 6.1.21-v7+ arm LE
14 Apr 10:29:38 - [info] Loading palette nodes
14 Apr 10:29:42 - [info] Dashboard version 3.4.0 started at /ui
14 Apr 10:29:43 - [info] Settings file  : /home/sftp/.node-red/settings.js
14 Apr 10:29:43 - [info] Context store  : 'default' [module=memory]
14 Apr 10:29:43 - [info] User directory : /home/sftp/.node-red
14 Apr 10:29:43 - [warn] Projects disabled : editorTheme.projects.enabled=false
14 Apr 10:29:43 - [info] Flows file     : /home/sftp/.node-red/RideStatus-Client.json
14 Apr 10:29:43 - [info] Server now running at http://127.0.0.1:1880/
14 Apr 10:29:43 - [warn] Using unencrypted credentials
14 Apr 10:29:43 - [info] *****************************************************************
14 Apr 10:29:43 - [info] Flows stopped in safe mode. Deploy to start.
14 Apr 10:29:43 - [info] *****************************************************************
14 Apr 10:29:46 - [red] Uncaught Exception:
14 Apr 10:29:46 - [error] Error: send ENETUNREACH 255.255.255.255:44818
    at doSend (node:dgram:713:16)
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
    at afterDns (node:dgram:659:5)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)

Is sftp just the name of the user or is that a mounted location (Secure File Transfer Protocol) or something similar.

That's the username.

If you move an SD card from one that works to one that doesn't does the error move with the card or stick with the Pi?

If it sticks with the Pi, if you physically swap two of the Pis (one working and one not working) by swapping over over all the connections does it stick with the Pi?

Are the Pis identical build?

It moves with the card. The Pis are all 3B+.

In that case the cards are not all the same. Either the cards are faulty or your image copies failed.

1 Like

I believe you are correct and can't believe I didn't think of that. I have a mixture of 32GB cards, 2 types of Samsung and one of Sandisk. It's one of the Samsung cards that isn't working. Thank you, Colin!

Well. That wasn't it, either. I'm seeing the same behavior on almost every card. Oh well.

Set Log Level to debug in settings.js and see if it gives you any clues about where it is coming from.
What non-core nodes have you installed?
Something is trying to do a broadcast, and failing, and crashing node-red. It is before the flows are started though.

Sorry, I meant set the log level to trace.

Yes something is trying to broadcast and is failing. Any industrial protocol nodes perhaps ?

I had the same thought at first. Port 44818 is used by A-B PLCs. I had node-red-contrib-pccc installed but hadn't been deployed in the flow, so I uninstalled it, restarted NR and still had the same problem.

What does the startup log show with trace level logging set?

Working on that now in between other things at work.

I don't believe this. Everything seems to be fine today.

It is possibly a subtle timing bug to do with the network. It will come back, if you are sure that it did occur after you removed the node you mentioned.