# 502: Bad Gateway

**URL:** <https://discourse.nodered.org/t/502-bad-gateway/63352>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [1 June 2022 10:33 UTC](https://discourse.nodered.org/t/502-bad-gateway/63352 "2022-06-01T10:33:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stresshead](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@stresshead](https://discourse.nodered.org/u/stresshead)\
**Post date:** [1 June 2022 10:33 UTC](https://discourse.nodered.org/t/502-bad-gateway/63352/1 "2022-06-01T10:33:20Z")

</div>

Had a brief (like a second) power outage last night. I can't get back into NR from Home Assistant because I'm getting a 502: Bad Gateway error. Tried restoring HA from yesterday, but that doesn't help.

Running HA and NR on an Odroid N2+.

I tried removing the folder "follow-redirects" and restarted NR, but I still get the 502, but with a different folder name in the error log.

This is the error log.

## patching file nodes/ui\_base.html Hunk #1 succeeded at 1162 (offset 631 lines). npm ERR! code ENOTEMPTY npm ERR! syscall rename npm ERR! path /config/node-red/node\_modules/follow-redirects npm ERR! dest /config/node-red/node\_modules/.follow-redirects-SJVnQEvE npm ERR! errno -39 npm ERR! ENOTEMPTY: directory not empty, rename '/config/node-red/node\_modules/follow-redirects' -\> '/config/node-red/node\_modules/.follow-redirects-SJVnQEvE' npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/\_logs/2022-06-01T06\_55\_04\_259Z-debug.log [08:08:31] FATAL: Failed un-installing conflicting packages [cont-init.d] [node-red.sh](https://node-red.sh/): exited 1. [cont-finish.d] executing container finish scripts... [cont-finish.d] [99-message.sh](https://99-message.sh/): executing...

## Oops! Something went wrong. We are so sorry, but something went terribly wrong when starting or running this add-on. Be sure to check the log above, line by line, for hints.

Any help gratefully received because my house is currently dead.

---

<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:** [1 June 2022 16:41 UTC](https://discourse.nodered.org/t/502-bad-gateway/63352/2 "2022-06-01T16:41:06Z")

</div>

That looks to me like a corrupted disk. Probably safest to restore from backup.

---

<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:** [31 July 2022 16:41 UTC](https://discourse.nodered.org/t/502-bad-gateway/63352/3 "2022-07-31T16:41:53Z")

</div>

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