502 gateway error

Anyone else all the sudden getting 502 bad gateway error? It was fine ealrlier this morning and I have not updated anything.

Welcome Rob. I'm afraid that you need to give us a lot more to go on. For example, what is producing that error or at least, where are you seeing it?

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
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-customizations: starting
s6-rc: info: service init-customizations successfully started
s6-rc: info: service init-nodered: starting
s6-rc: info: service init-nginx successfully started
up to date, audited 82 packages in 2s
9 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
s6-rc: info: service init-nodered successfully started
s6-rc: info: service nodered: starting
s6-rc: info: service nodered successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[12:32:03] INFO: Starting Node-RED...

start
node $NODE_OPTIONS node_modules/node-red/red.js --settings /etc/node-red/config.js
2 Apr 12:32:08 - [info]
Welcome to Node-RED
===================
2 Apr 12:32:08 - [info] Node-RED version: v3.0.2
2 Apr 12:32:08 - [info] Node.js version: v18.14.2
2 Apr 12:32:08 - [info] Linux 5.15.84-v8 arm64 LE
2 Apr 12:32:10 - [info] Loading palette nodes
2 Apr 12:32:16 - [info] Dashboard version 3.4.0 started at /endpoint/ui
2 Apr 12:32:17 - [info] Settings file : /etc/node-red/config.js
2 Apr 12:32:17 - [info] Context store : 'default' [module=memory]
2 Apr 12:32:17 - [info] User directory : /config/node-red/
2 Apr 12:32:17 - [warn] Projects disabled : editorTheme.projects.enabled=false
2 Apr 12:32:17 - [info] Flows file : /config/node-red/flows.json
2 Apr 12:32:17 - [warn] Encrypted credentials not found
2 Apr 12:32:18 - [info] Server now running at http://127.0.0.1:46836/
2 Apr 12:32:18 - [info] Starting flows
[12:32:18] INFO: Starting NGinx...
2 Apr 12:32:18 - [error] [scene stop:a0c564c86aac080a] TypeError: Cannot read properties of undefined (reading 'onChanged')
2 Apr 12:32:18 - [info] Started flows
2 Apr 12:32:18 - [red] Uncaught Exception:
2 Apr 12:32:18 - [error] TypeError: Cannot read properties of undefined (reading 'getCurrentId')
at Timeout.init [as _onTimeout] (/config/node-red/node_modules/node-red-contrib-scenes/src/nodes/scene-startstop.ts:20:24)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7)
[12:32:19] INFO: Service Node-RED exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
[12:32:19] INFO: Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service init-nginx: stopping
s6-rc: info: service nodered: stopping
s6-rc: info: service init-nginx successfully stopped
s6-rc: info: service nodered successfully stopped
s6-rc: info: service init-nodered: stopping
s6-rc: info: service init-nodered successfully stopped
s6-rc: info: service init-customizations: stopping
s6-rc: info: service init-customizations successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
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

I hope this helps.

It appears to be an error with a specific node. You may need to raise an issue against that node so that the author can respond.

Is there a way not to lose everything if I uninstall and reinstall it. Should I just restore my back up of ha?

I do appreciate your help

I have restored 2 back ups, uninstalled node red a dozen times and now it still wont start. Any suggestions on how i can get this working again?

Start NR in the safe mode node-red --safe and remove the node's that will give trouble

I can’t get anything to work. I can’t get safe mode to start either. Is there no way to just uninstall everything and start over? Why is it when I uninstalled it I just can’t get a fresh install. It keep trying to load old stuff.

Possibly you uninstalled the software (which was probably not necessary), but did not remove the flows, installed nodes etc.
How are you removing and installing node-red?

I just uninstalled software. I am Kinda new to this so I am not even sure I did the safe mode correct. How do I uninstall the nodes and flows?

I tried the "node-red --safe" in config and it showed up red

I just want to start completely over

That tells us nothing. What do you mean?
We have no idea about how your system is setup so we can't advise how to fix it. So tell us how you installed node red and how you tried to uninstall it.
Also, how do you normally run node red?

I have node red installed on home assistant. Apparently something happened and it can not get to to web ui. It appears it is running in background but I can not access it. I have tried uninstalling it from the add ons in home assistant and starting new and fresh install. I have no issues in redoing all my flows. I just want to be able to access it again. When I go to start node red it will not even start or create a new log. I am sorry I’m frustrating you but this came out of no where. I have been using node red for about 2 months and have had no issues till today. All I did was add a current scene node.

You should have mentioned that as it makes a huge difference to how the problem is to be solved. The node-red setup under HA is completely different to a normal install, and few here use HA so you will probably be better asking on an HA forum.

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