Node-red add-on not running

Hi,

I’m running HomeAssistant Core 2022.9.4
Until last week I had no problems running Node-red, but now I have a blank screen entering Node-red in Home Assistant.
Either I get a bad gateway - error 502 massager the message add-on is not running. Restart first.
When I restart it, I get either the message bad gateway or again the add-on is not running.
Is this a known problem and if so, what can I do to fix it. Until now I have not found the solution.
Thank you in advance.
Yvonne

What’s in your log ? You can find interesting information…

This is the log file:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh

Add-on: Node-RED
Flow-based programming for the Internet of Things

Add-on version: 13.4.0
You are running the latest version of this add-on.
System: Home Assistant OS 9.0 (armv7 / raspberrypi3)
Home Assistant Core: 2022.9.4
Home Assistant Supervisor: 2022.09.1

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/customizations.sh
cont-init: info: /etc/cont-init.d/customizations.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/node-red.sh
[15:41:03] FATAL:
[15:41:03] FATAL: Configuration of this add-on is incomplete.
[15:41:03] FATAL:
[15:41:03] FATAL: Please be sure to set the “credential_secret” option.
[15:41:03] FATAL:
[15:41:03] FATAL: The credential secret is an encryption token, much like
[15:41:03] FATAL: a password, that is used by Node-RED for encrypting
[15:41:03] FATAL: credentials you put into Node-RED.
[15:41:03] FATAL:
[15:41:03] FATAL: Just like a password, a credential secret can be
[15:41:03] FATAL: anything you like. Just be sure to store it somewhere
[15:41:03] FATAL: safe for later, e.g., in case of a recovery.
[15:41:03] FATAL:
cont-init: info: /etc/cont-init.d/node-red.sh exited 1
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
prog: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

But why is this happening from one moment to another. It always worked fine.
Thank you for your help.

I have set the credential_secret many time, but it is gone, although I saved it.

it seems to be the issue…

Try to remove / reinstall the add-on maybe ?

I have removed NodeRed and reinstalled it. I have even created a new HomeAssistant RaspberryPi and installed Node-Red on it. The problem is the configuration I guess. It has to do with the SSL.
I can’t disable the SSL option. It enables it the moment I press the save button.
In the certfile it says: fullchain.pem
I get either Bad Gateway or Node-Red is not started in the screen.
I hope somebody can give me some help.
Thank you.

I found the solution on the internet:
Click on the conf tab of the Node-red add-on and basically paste this in. T

credential_secret: redacted but something difficult to guess
dark_mode: false
http_node:
username: redacted but same as HA login
password: redacted but same as HA password
http_static:
username: redacted but same as HA login
password: redacted but same as HA password
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: false
system_packages: []
npm_packages: []
init_commands: []

I hope this will help somebody else as well.
Yvonne

5 Likes

HI!

I have the same issue (HA installed on Synlogy NAS) with the same log.
@Yvonne, thank you for sharing. Unfortunately this did not work.

Anyone else an idea / solution?

Arthur

Arthur, I found out that I have this problem with the Safari browser. If I use the google browser or edge, nodered is working fine.
Hope this helps for you as well.
Yvonne

2 Likes

I am having a similar issue. However, in my case, I get a message, “Add-on is not running. Please start first” when I go to the Add-on page, sure enough, there is a red indicator in the top right corner telling me it has stopped. So I press start and check the logs, it appears to try and start-up, and it seems to be running; however, Home assistant is unable to see it running for some reason.
So I decided to uninstall v 13.4.0 of the Node-Red add-on and delete the config\node-red folder so that there are no flows on Home Assistant and the configuration is Node-Red default. And what do you know…. It didn’t fix it… so to recap. Node red appears to start, but Home assistant can’t access it.

Version information

Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 13.4.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.0  (amd64 / qemux86-64)
 Home Assistant Core: 2022.9.7
 Home Assistant Supervisor: 2022.09.1

Logs are below

s6-rc: info: service s6rc-oneshot-runner: starting

s6-rc: info: service s6rc-oneshot-runner successfully started

s6-rc: info: service fix-attrs: starting

s6-rc: info: service fix-attrs successfully started

s6-rc: info: service legacy-cont-init: starting

cont-init: info: running /etc/cont-init.d/00-banner.sh

-----------------------------------------------------------

Add-on: Node-RED

Flow-based programming for the Internet of Things

-----------------------------------------------------------

Add-on version: 13.4.0

You are running the latest version of this add-on.

System: Home Assistant OS 9.0 (amd64 / qemux86-64)

Home Assistant Core: 2022.9.7

Home Assistant Supervisor: 2022.09.1

-----------------------------------------------------------

Please, share the above information when looking for help

or support in, e.g., GitHub, forums or the Discord chat.

-----------------------------------------------------------

cont-init: info: /etc/cont-init.d/00-banner.sh exited 0

cont-init: info: running /etc/cont-init.d/01-log-level.sh

cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0

cont-init: info: running /etc/cont-init.d/customizations.sh

cont-init: info: /etc/cont-init.d/customizations.sh exited 0

cont-init: info: running /etc/cont-init.d/nginx.sh

cont-init: info: /etc/cont-init.d/nginx.sh exited 0

cont-init: info: running /etc/cont-init.d/node-red.sh

patching file nodes/ui_base.html

Hunk #1 succeeded at 1164 (offset 633 lines).

cont-init: info: /etc/cont-init.d/node-red.sh exited 0

s6-rc: info: service legacy-cont-init successfully started

s6-rc: info: service legacy-services: starting

services-up: info: copying legacy longrun nginx (no readiness notification)

services-up: info: copying legacy longrun nodered (no readiness notification)

s6-rc: info: service legacy-services successfully started

[20:53:30] INFO: Starting Node-RED...

> start

> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"

4 Oct 20:53:31 - [info]

Welcome to Node-RED

===================

4 Oct 20:53:31 - [info] Node-RED version: v3.0.2

4 Oct 20:53:31 - [info] Node.js version: v16.16.0

4 Oct 20:53:31 - [info] Linux 5.15.67 x64 LE

4 Oct 20:53:32 - [info] Loading palette nodes

4 Oct 20:53:34 - [info] Dashboard version 3.2.0 started at /endpoint/ui

4 Oct 20:53:35 - [info] Settings file : /etc/node-red/config.js

4 Oct 20:53:35 - [info] Context store : 'default' [module=memory]

4 Oct 20:53:35 - [info] User directory : /config/node-red/

4 Oct 20:53:35 - [warn] Projects disabled : editorTheme.projects.enabled=false

4 Oct 20:53:35 - [info] Flows file : /config/node-red/flows.json

4 Oct 20:53:35 - [warn] Encrypted credentials not found

4 Oct 20:53:35 - [info] Server now running at http://127.0.0.1:46836/

4 Oct 20:53:35 - [info] Starting flows

4 Oct 20:53:35 - [info] Started flows

[20:53:36] INFO: Starting NGinx...

4 Oct 20:53:40 - [info] [server:Home Assistant] Connecting to http://supervisor/core

4 Oct 20:53:40 - [info] [server:Home Assistant] Connected to http://supervisor/core

The problem was solved when I used Google Chrome or Microsoft Edge on a Windows laptop. With Safari on the iMac the problem still exists. So it has to do something with the browser of Apple.
Hope this helps you as well.

I Have the same situation as you " Node-RED Add-on is not running. Please start it first OK" only noticed it today as it was running sluggish and wanted to check the flows. Did you manage to resolve it?

Hello all,

I have the same problem as often described here, so I don’t post any logs, because it’s the same anyway.

I can’t remember exactly when node red stopped starting, I think about 2 months ago or so.

I deleted all the “problematic nodes”, then it worked for a while and since yesterday it’s the same again, node red just won’t start, honestly? That makes no sense to me if I have to constantly check whether the thing is running! I’m now moving my Node Red instance away from HA, it’s too unstable for me! I think HA is a great project, but I don’t have time to check every day if everything is working. Stop offering add ons that don’t work, it doesn’t make sense, just like it doesn’t make sense to release a new version every month and push 0 to 6 or more patches. I know a lot of work goes into it, I know a lot of people contribute in their spare time for nothing. I’ve been paying a small amount to Nabu Case myself for over a year and I think it’s good, it could also cost 10€ a month, I wouldn’t care. Just don’t keep releasing new versions that don’t run stably. Greetings

Please see my answer of oct 4. This has done the job for me.

Sadly I’m using Chrome on a Windows pc already. I did try edge as well.

It worked for me but I had to click on Node-Red link a few time before it shows the page.
What i did:

  1. set de conf page according to above example.
  2. save
  3. click on “OPEN WEB UI”
  4. if blank screen or “504 Bad Gateway” click on browser “Back” arrow
  5. repeat 3. and 4. until Node-Red page loads.

It is possible to load the Node-Red page after 1-2 minutes after add-on starts but this is what i did and it worked

2 Likes

same happened to me:

I had to set the credential_secret (Configuration tab) as mentioned in the Documentation tab.

I had to disable SSL in order to get node-red up and running.

I did not find any information about how to create the cert-file and pem-file which is normally used to encrypt the ssl connection. If we had to create these two it is still a question how to put them to the mentioned /ssl/ directory. This one is for shure placed in one of the docker containers.

Would be nice, when the documentation could be updated for this.

I’m using Firefox with addon “PrivacyBadger”.
This Addon blocks starting and configurating the “node-red-addon”

I have the same issue as you describe.
HA tells me Node-Red is not started, however it is possible for me to login via port 1880.

Does anybody have a clue why this happens?

Exactly the same behaviour here. Can acces node red in the browser via the addon port, Home Assistant tells me “Add-on is not running. Please start it first” and on the addon page there is a red dot in the top left croner, indicating that the addon is not running. logs look fine, no errors there.