Red node does not start anymore


since a edit on a template of the dashboard node red dont start anymore.
Starting manually in putty gives me this console output:

Welcome to Node-RED
23 Sep 15:15:54 - [info] Node-RED version: v1.3.4
23 Sep 15:15:54 - [info] Node.js  version: v10.24.0
23 Sep 15:15:54 - [info] Linux 5.10.60-v7l+ arm LE
23 Sep 15:15:56 - [info] Loading palette nodes
23 Sep 15:16:02 - [info] Dashboard version 2.30.0 started at /ui
23 Sep 15:16:02 - [info] Settings file  : /home/pi/.node-red/settings.js
23 Sep 15:16:02 - [info] Context store  : 'default' [module=memory]
23 Sep 15:16:02 - [info] User directory : /home/pi/.node-red
23 Sep 15:16:02 - [warn] Projects disabled : editorTheme.projects.enabled=false
23 Sep 15:16:02 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.j                         son
(node:19231) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or di                         rectory, scandir '/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/ex                         amples'
(node:19231) UnhandledPromiseRejectionWarning: 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(). (rejectio                         n id: 1)
(node:19231) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr                         ecated. In the future, promise rejections that are not handled will terminate th                         e Node.js process with a non-zero exit code.
23 Sep 15:16:02 - [error] Uncaught Exception:
23 Sep 15:16:02 - [error] Error: getaddrinfo ENOTFOUND
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.

What can i do?

Best regards,

try starting in safe mode node-red --safe and then you should be able to edit the flow - undo/remove the error then deploy

Didnt work. same error...

What does this command show
ls -l /usr/lib/node_modules/node-red/node_modules/@node-red/nodes

total 44
-rw-r--r-- 1 root root  3992 Oct 26  1985 99-sample.html.demo
-rw-r--r-- 1 root root  2468 Oct 26  1985 99-sample.js.demo
drwxr-xr-x 8 root root  4096 Sep  5 18:24 core
drwxr-xr-x 2 root root  4096 Sep  5 18:24 icons
-rw-r--r-- 1 root root   660 Oct 26  1985 index.js
-rw-r--r-- 1 root root 10243 Oct 26  1985 LICENSE
drwxr-xr-x 9 root root  4096 Sep  5 18:24 locales
drwxr-xr-x 7 root root  4096 Sep  5 18:24 node_modules
-rw-r--r-- 1 root root  2209 Apr 29 15:28 package.json

Its not possible for me to create a new directory manually. Why is this folder permisson denied?

After creating this folder manually with sudo i got one error left:

24 Sep 15:22:59 - [info] Node-RED version: v1.3.4
24 Sep 15:22:59 - [info] Node.js  version: v10.24.0
24 Sep 15:22:59 - [info] Linux 5.10.60-v7l+ arm LE
24 Sep 15:23:01 - [info] Loading palette nodes
24 Sep 15:23:08 - [info] Dashboard version 2.30.0 started at /ui
24 Sep 15:23:08 - [info] Settings file  : /home/pi/.node-red/settings.js
24 Sep 15:23:08 - [info] Context store  : 'default' [module=memory]
24 Sep 15:23:08 - [info] User directory : /home/pi/.node-red
24 Sep 15:23:08 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Sep 15:23:08 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
24 Sep 15:23:08 - [error] Uncaught Exception:
24 Sep 15:23:08 - [error] Error: getaddrinfo ENOTFOUND
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)


After that i followed this instructions:

Now its running - but editor is not available at :1880/

What exactly did you do to make the exception go away? The fix in the link (adding localhost to hosts file) would not make a difference.

Something is really messed up I think. Is this a new install of node-red or has you been using it successfully for a while? How did you install node-red? Editing a ui_template would not cause the problems you are seeing. I suspect your system may be messed up in some way.

Also show us the full startup log you are now seeing.

I dont understand what the problem was. Last thing i edited was to change the config from "" to the current ip. Now everything is available and running.

I used it for a while and never changed anything of the settings. So i dont understand what caused the problem.
Maybe its helpful for others.

What config?

settings.js in the /home/pi/node-red folder.

Exactly what in that file?

The host adress and so on.

module.exports = {
    // the tcp port that the Node-RED web server is listening on
    uiPort: process.env.PORT || 1880,

    // By default, the Node-RED UI accepts connections on all IPv4 interfaces.
    // To listen on all IPv6 addresses, set uiHost to "::",
    // The following property can be used to listen on a specific interface. For
    // example, the following would only allow connections from the local machine.
    uiHost: "",

    // Retry time in milliseconds for MQTT connections
    mqttReconnectTime: 15000,

    // Retry time in milliseconds for Serial port connections
    serialReconnectTime: 15000,


The host setting tells Node-RED what network interface to bind on. You'd typically use the IP address of the host on that interface, or to listen on all interfaces (the default).

Setting to to a DNS name that doesn't exist like you did would cause the bind to fail in exactly the way you saw.

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