Node red problem after updating packages 2022

I also this one :

2022/03/01 18:49:46 [error] 609#609: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET /null HTTP/1.1", upstream: "http://127.0.0.1:46836/null", host: "xxxx.duckdns.org:8123", referrer: "https://xxxxx.duckdns.org:8123/api/hassio_ingress/LoU-Cnl1bxSDwjOvkTlL95pACuS98Gs-PmK-zBQ2Hwg/"

Also had the same 502 Bad Gateway error since this morning. Seems NR just keeps rebooting all the time:

> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
1 Mar 20:14:30 - [info] 
Welcome to Node-RED
===================
1 Mar 20:14:30 - [info] Node-RED version: v2.2.2
1 Mar 20:14:30 - [info] Node.js  version: v16.14.0
1 Mar 20:14:30 - [info] Linux 5.10.92-v8 arm64 LE
1 Mar 20:14:32 - [info] Loading palette nodes
1 Mar 20:14:36 - [info] Dashboard version 3.1.0 started at /endpoint/ui
1 Mar 20:14:39 - [info] Settings file  : /etc/node-red/config.js
1 Mar 20:14:39 - [info] Context store  : 'default' [module=localfilesystem]
1 Mar 20:14:39 - [info] User directory : /config/node-red/
1 Mar 20:14:39 - [warn] Projects disabled : editorTheme.projects.enabled=false
1 Mar 20:14:39 - [info] Flows file     : /config/node-red/flows.json
1 Mar 20:14:39 - [info] Server now running at http://127.0.0.1:46836/
1 Mar 20:14:40 - [info] Starting flows
[20:14:42] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
1 Mar 20:14:46 - [info] 
Welcome to Node-RED
===================
1 Mar 20:14:46 - [info] Node-RED version: v2.2.2
1 Mar 20:14:46 - [info] Node.js  version: v16.14.0
1 Mar 20:14:46 - [info] Linux 5.10.92-v8 arm64 LE
1 Mar 20:14:47 - [info] Loading palette nodes
1 Mar 20:14:52 - [info] Dashboard version 3.1.0 started at /endpoint/ui
2022/03/01 20:14:54 [error] 572#572: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:46836/", host: "homeassistantprod.local:8123", referrer: "http://homeassistantprod.local:8123/a0d7b954_nodered"
1 Mar 20:14:55 - [info] Settings file  : /etc/node-red/config.js
1 Mar 20:14:55 - [info] Context store  : 'default' [module=localfilesystem]
1 Mar 20:14:55 - [info] User directory : /config/node-red/
1 Mar 20:14:55 - [warn] Projects disabled : editorTheme.projects.enabled=false
1 Mar 20:14:55 - [info] Flows file     : /config/node-red/flows.json
1 Mar 20:14:55 - [info] Server now running at http://127.0.0.1:46836/
1 Mar 20:14:55 - [info] Starting flows
[20:14:58] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
1 Mar 20:15:01 - [info] 
Welcome to Node-RED
===================
1 Mar 20:15:01 - [info] Node-RED version: v2.2.2
1 Mar 20:15:01 - [info] Node.js  version: v16.14.0
1 Mar 20:15:01 - [info] Linux 5.10.92-v8 arm64 LE
1 Mar 20:15:03 - [info] Loading palette nodes
1 Mar 20:15:07 - [info] Dashboard version 3.1.0 started at /endpoint/ui
1 Mar 20:15:10 - [info] Settings file  : /etc/node-red/config.js
1 Mar 20:15:10 - [info] Context store  : 'default' [module=localfilesystem]
1 Mar 20:15:10 - [info] User directory : /config/node-red/
1 Mar 20:15:10 - [warn] Projects disabled : editorTheme.projects.enabled=false
1 Mar 20:15:10 - [info] Flows file     : /config/node-red/flows.json
1 Mar 20:15:10 - [info] Server now running at http://127.0.0.1:46836/
1 Mar 20:15:10 - [info] Starting flows
[20:15:13] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
1 Mar 20:15:16 - [info] 

I believe that I found the reason :muscle:

Actually, thanks to @PickleSlice who gave me a clue with Node-Red addon. 11.0.4 version was release yesterday and in the issue log of the GitHub project there is crash reference with Serial port. : https://github.com/hassio-addons/addon-node-red/issues/1312

On my configuration, I have with a teleinfo module the capacity to monitor my energy consumption
image

This module is connected to my raspberry pi4 (that host HA) with an USB connector. But in Node-Red, I was obliged to declare a Serial connection in order to read my electric meter.
image

By removing the USB connector, I immediately retrieve access to NodeRed interface.

So, now, I have to wait for a new NodeRed module update.

I hope that my explanation are clear and can help most of you

3 Likes

Exact. I had the same behavior, and if you are in 11.0.4 version and use Serial port (even if it’s through an USB), remove it and normally you’ll retrieve access to NodeRed :crossed_fingers:

1 Like

I’m glad that worked for you, but I don’t have anything like that unfortunately.

You haven’t any serial node or any devices connected on your serial port ?

No, nothing.

What’s happened for you today ?
Do you encounter the same behavior than me and juanh (constant restart of NodeRed ?)

@PickleSlice if you enable safe mode will it start? you could try adding the following to your nodered config.

init_commands: 
    - npm uninstall node-red-contrib-huemagic

If none of this helps, restart nodered, wait 2-3 minutes, go to the nodered log page and post the output. Also what type of home assistant install are you using.

I don’t think I explained it properly. My Node-RED addon launches fine, just none of my hue bulbs that I control with HueMagic are working.

Try removing the hue magic nodes from the side menu, manage palette, uninstall. Restart nodered then reinstall via the the palette manager.

I’ll give that a shot tonight when I get home, thank you!

I have the same issue and disconnect the usb until it is fixed :frowning:

The same problem with serial and RFLink.
I restored a backup I had, with version 10.0.1 and everything working perfectly.

I had the same errors. The problem was an esphome sensor (which triggers some automations in node red) which was having problems and changing state many times per second

I am having the same problems with Node Red as soon as I plug a USB to serial adaptor into the raspberry pi. It prevents access to Node Red. I have tried both FTDI and Prolific usb to serial adaptors. Within a few seconds of removing the adapter, I can access Node Red again. Everything else in HA seems fine. If I try using port 1880 whilst the USB adaptor is plugged in, I get the NGinx “Bad Gateway” screen - all is fine as as soon as I unplug the adaptor. Really annoying as there seems no other way to use a bi-directional serial link to an external device for use. Guess we will just have to wait. I don’t know how one reports this kind of problem.

Does the adapter work otherwise. Does it show up in HA? Have you tried to connect through it from H?

I am having the same issue with a Envi Cost serial interface, the port works fine using the terminal and receives data properly but Node-Red Serial component does not connect and does hang the interface. Removing the USB adaptor allows the UI to work again.
It seems to me the Node-Red Serial component does not have the correct privs to connect and hangs when constantly retrying!

I know it’s an issue with zigbee/zwave usb, they need to be extended away from the pie a meter or two. Have you tried with an extension cable?

I tried that, same. The fact that the Pi can see it and works using a terminal application tells me it’s purely the HA/Serial components at fault. -Thanks for that though