zachowj / hass-node-red

Companion Component for node-red-contrib-home-assistant-websocket to help integrate Node-RED with Home Assistant Core
MIT License
442 stars 181 forks source link

Node RED UI crashing with 502 Bad Gateway #254

Closed LittleLama closed 4 months ago

LittleLama commented 4 months ago

Hi Since Node RED v3.1.5, many entities become unvailable and restores sometimes. But when I'm trying to access Node RED UI from Home Assistant I get a 502 Bad Gateway error and nothing else displays.

I have to reboot Home Assistant to get access again but some hours later everything entities get unavailable and I can't access Node RED UI again.

Node RED log

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

15 Feb 11:26:33 - [info] 

Welcome to Node-RED
===================

15 Feb 11:26:33 - [info] Node-RED version: v3.1.5
15 Feb 11:26:33 - [info] Node.js  version: v18.19.0
15 Feb 11:26:33 - [info] Linux 6.1.74-haos x64 LE
15 Feb 11:26:34 - [info] Loading palette nodes
15 Feb 11:26:34 - [info] Node-RED Contrib Theme Collection version: v3.1.9
15 Feb 11:26:36 - [info] Dashboard version 3.6.2 started at /endpoint/ui
[11:26:37] INFO: Service Node-RED exited with code 256 (by signal 9)
[11:26:38] INFO: Starting Node-RED...

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

15 Feb 11:26:40 - [info] 

Welcome to Node-RED
===================

15 Feb 11:26:40 - [info] Node-RED version: v3.1.5
15 Feb 11:26:40 - [info] Node.js  version: v18.19.0
15 Feb 11:26:40 - [info] Linux 6.1.74-haos x64 LE
15 Feb 11:26:40 - [info] Loading palette nodes
15 Feb 11:26:41 - [info] Node-RED Contrib Theme Collection version: v3.1.9
15 Feb 11:26:42 - [info] Dashboard version 3.6.2 started at /endpoint/ui
15 Feb 11:26:44 - [info] Settings file  : /etc/node-red/config.js
15 Feb 11:26:44 - [info] Context store  : 'default' [module=memory]
15 Feb 11:26:44 - [info] User directory : /config/
15 Feb 11:26:44 - [warn] Projects disabled : editorTheme.projects.enabled=false
15 Feb 11:26:44 - [info] Flows file     : /config/flows.json
15 Feb 11:26:44 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

15 Feb 11:26:44 - [warn] Encrypted credentials not found
15 Feb 11:26:44 - [info] Server now running at http://127.0.0.1:46836/
15 Feb 11:26:44 - [info] Starting flows
[11:26:44] INFO: Service Node-RED exited with code 256 (by signal 9)
[11:26:45] INFO: Starting Node-RED...

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

15 Feb 11:26:47 - [info] 

Welcome to Node-RED
===================

15 Feb 11:26:47 - [info] Node-RED version: v3.1.5
15 Feb 11:26:47 - [info] Node.js  version: v18.19.0
15 Feb 11:26:47 - [info] Linux 6.1.74-haos x64 LE
15 Feb 11:26:47 - [info] Loading palette nodes
15 Feb 11:26:48 - [info] Node-RED Contrib Theme Collection version: v3.1.9

Configuration

# Loads default set of integrations. Do not remove.
default_config:
http:
  use_x_forwarded_for: true
  trusted_proxies:
    - XXXXX
# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

logger:
  default: info
  logs:
    homeassistant.components.modbus: debug
    custom_components.nodered: debug

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

homeassistant:
  packages: !include_dir_merge_named packages/

Home Assistant cores log doesn't give anything relevant.

zachowj commented 4 months ago

This looks to be more of a Node-RED issue. Try the official discourse forums https://discourse.nodered.org/