# 502 gateway error

**URL:** <https://discourse.nodered.org/t/502-gateway-error/77165>\
**Category:** General\
**Tags:** home-assistant, node-red-contrib-scenes\
**Created:** [2 April 2023 15:28 UTC](https://discourse.nodered.org/t/502-gateway-error/77165 "2023-04-02T15:28:08Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 15:28 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/1 "2023-04-02T15:28:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 April 2023 16:16 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/2 "2023-04-02T16:16:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 16:38 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/3 "2023-04-02T16:38:06Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 16:38 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/4 "2023-04-02T16:38:50Z")

</div>

I hope this helps.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 April 2023 16:39 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/5 "2023-04-02T16:39:38Z")

</div>

> [@robmiller1000](#):
>
> node-red-contrib-scenes

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.

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 17:01 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/6 "2023-04-02T17:01:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 17:09 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/7 "2023-04-02T17:09:16Z")

</div>

I do appreciate your help

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 18:36 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/8 "2023-04-02T18:36:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [2 April 2023 18:49 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/9 "2023-04-02T18:49:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 19:22 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/10 "2023-04-02T19:22:43Z")

</div>

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.

---

<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:** [2 April 2023 19:27 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/11 "2023-04-02T19:27:10Z")

</div>

> [@robmiller1000](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 19:38 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/12 "2023-04-02T19:38:13Z")

</div>

> [@edje11](#):
>
> node-red --safe

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?

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 19:42 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/13 "2023-04-02T19:42:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 20:10 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/14 "2023-04-02T20:10:57Z")

</div>

I just want to start completely over

---

<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:** [2 April 2023 20:37 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/15 "2023-04-02T20:37:28Z")

</div>

> [@robmiller1000](#):
>
> I just uninstalled software

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?

---

<div class="post-metadata">

**Author:** ![robmiller1000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robmiller1000/32/78228_2.png) [@robmiller1000](https://discourse.nodered.org/u/robmiller1000)\
**Post date:** [2 April 2023 21:20 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/16 "2023-04-02T21:20:41Z")

</div>

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.

---

<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:** [3 April 2023 09:07 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/17 "2023-04-03T09:07:53Z")

</div>

> [@robmiller1000](#):
>
> I have node red installed on home assistant.

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 June 2023 09:08 UTC](https://discourse.nodered.org/t/502-gateway-error/77165/18 "2023-06-02T09:08:45Z")

</div>

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