Connection closed to supervisor/core

Hi,
I keep getting a connection closed error. My logs looks like this:

[13:55:35] INFO: Starting Node-RED...

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

3 Feb 13:55:37 - [info] 

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

3 Feb 13:55:37 - [info] Node-RED version: v2.2.0
3 Feb 13:55:37 - [info] Node.js  version: v16.13.2
3 Feb 13:55:37 - [info] Linux 5.4.0-97-generic x64 LE
3 Feb 13:55:38 - [info] Loading palette nodes
3 Feb 13:55:41 - [info] Dashboard version 3.1.5 started at /endpoint/ui
Traceback (most recent call last):
  File "/opt/node_modules/node-red-node-pi-gpio/testgpio.py", line 3, in <module>
    import RPi.GPIO as GPIO
  File "/usr/lib/python3.9/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
3 Feb 13:55:41 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
3 Feb 13:55:41 - [info] Settings file  : /etc/node-red/config.js
3 Feb 13:55:41 - [info] Context store  : 'default' [module=memory]
3 Feb 13:55:41 - [info] User directory : /config/node-red/
3 Feb 13:55:41 - [warn] Projects disabled : editorTheme.projects.enabled=false
3 Feb 13:55:41 - [info] Flows file     : /config/node-red/flows.json
3 Feb 13:55:41 - [info] Server now running at http://127.0.0.1:46836/
3 Feb 13:55:41 - [info] Starting flows
[13:55:41] INFO: Starting NGinx...
3 Feb 13:55:46 - [info] [server:Home Assistant] Connecting to http://supervisor/core
3 Feb 13:55:46 - [info] [server:Home Assistant] Connected to http://supervisor/core
3 Feb 13:55:47 - [info] [server:Home Assistant] Connection closed to http://supervisor/core
3 Feb 13:55:52 - [info] [server:Home Assistant] Connecting to http://supervisor/core
3 Feb 13:55:52 - [info] [server:Home Assistant] Connected to http://supervisor/core
3 Feb 13:55:52 - [info] [server:Home Assistant] Connection closed to http://supervisor/core
3 Feb 13:55:57 - [info] [server:Home Assistant] Connecting to http://supervisor/core
3 Feb 13:55:57 - [info] [server:Home Assistant] Connected to http://supervisor/core
3 Feb 13:55:57 - [info] [server:Home Assistant] Connection closed to http://supervisor/core
3 Feb 13:56:02 - [info] [server:Home Assistant] Connecting to http://supervisor/core
3 Feb 13:56:02 - [info] [server:Home Assistant] Connected to http://supervisor/core
3 Feb 13:56:03 - [info] [server:Home Assistant] Connection closed to http://supervisor/core
3 Feb 13:56:08 - [info] [server:Home Assistant] Connecting to http://supervisor/core
3 Feb 13:56:08 - [info] [server:Home Assistant] Connected to http://supervisor/core
3 Feb 13:56:08 - [info] [server:Home Assistant] Connection closed to http://supervisor/core
3 Feb 13:56:13 - [info] [server:Home Assistant] Connecting to http://supervisor/core
3 Feb 13:56:13 - [info] [server:Home Assistant] Connected to http://supervisor/core
3 Feb 13:56:13 - [info] [server:Home Assistant] Connection closed to http://supervisor/core
3 Feb 13:56:18 - [info] [server:Home Assistant] Connecting to http://supervisor/core
3 Feb 13:56:18 - [info] [server:Home Assistant] Connected to http://supervisor/core
3 Feb 13:56:19 - [info] [server:Home Assistant] Connection closed to http://supervisor/core

I tried restoring from a backup, tried reinstalling node red, but nothing works. Any help is greatly appreciated.

First open a call service node next to server click the pencil delete any and all servers.

Export all your flows and backup.

Delete nodered companion if installed, look in your integration page if you are unsure.

Uninstall nodered.

Go to the config folder and rename the nodered folder to nodered.old. (you can delete this folder after your up and running.)

Restart the host from the supervisor page.

Follow steps on how to install nodered from addon page.

1 Like

thank you, will try this now.

Still couldn’t fix this.

Under supervisor I get this error:

22-02-28 08:17:42 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
22-02-28 08:17:42 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
22-02-28 08:17:42 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
22-02-28 08:17:43 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Received message 258:WebSocketError(<WSCloseCode.MESSAGE_TOO_BIG: 1009>, 'Message size 6353935 exceeds limit 4194304') is not str
22-02-28 08:17:43 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed

Olá, você usa algum broker público como “broker.hivemq.com”? Se for o caso desative a descoberta nele, resolveu no meu caso.

Hi Slovenc, could you fix it? Have the same problem…

Hi,
I made a new installation then made a restore from a full backup and it worked.

I solved the problem for my installation:
As mentioned above, the “problem” is that ALL entities are sent in a single websocket call.

  • I hence looked at my entities under “Developer Tools/States”. I had A LOT of device tracker entities with an unknown state. Probably left overs from a previously used BLE tracker.
  • I then went to my /config directory, and looked at “known_devices” file. It was blown up to 3.8kb with A LOT of entries. As I don’t really need the know_devices file I made a copy of it and deleted the original file.
  • After a restart of HA the error was gone, and Node Red worked fine again