# Node-Red Crashes on Startup

**URL:** <https://discourse.nodered.org/t/node-red-crashes-on-startup/77568>\
**Category:** General\
**Created:** [14 April 2023 15:38 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568 "2023-04-14T15:38:06Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [14 April 2023 15:38 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/1 "2023-04-14T15:38:07Z")

</div>

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.

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2023 15:52 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/2 "2023-04-14T15:52:36Z")

</div>

> [@ChZeman](#):
>
> `User directory : /home/sftp/.node-red`

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

---

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [14 April 2023 15:53 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/3 "2023-04-14T15:53:10Z")

</div>

That's the username.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2023 15:55 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/4 "2023-04-14T15:55:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [14 April 2023 16:03 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/5 "2023-04-14T16:03:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2023 16:04 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/6 "2023-04-14T16:04:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [14 April 2023 16:32 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/7 "2023-04-14T16:32:16Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [14 April 2023 18:15 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/8 "2023-04-14T18:15:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2023 20:50 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/9 "2023-04-14T20:50:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2023 21:05 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/10 "2023-04-14T21:05:00Z")

</div>

Sorry, I meant set the log level to trace.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 April 2023 21:11 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/11 "2023-04-14T21:11:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [15 April 2023 12:51 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/12 "2023-04-15T12:51:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2023 12:53 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/13 "2023-04-15T12:53:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [15 April 2023 13:05 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/14 "2023-04-15T13:05:13Z")

</div>

Working on that now in between other things at work.

---

<div class="post-metadata">

**Author:** ![ChZeman](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@ChZeman](https://discourse.nodered.org/u/ChZeman)\
**Post date:** [15 April 2023 13:25 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/15 "2023-04-15T13:25:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2023 14:25 UTC](https://discourse.nodered.org/t/node-red-crashes-on-startup/77568/16 "2023-04-15T14:25:33Z")

</div>

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.
