Event nodes always "Connecting" but otherwise work

I have two node red servers, both running node-red-contrib-home-assistant-websocket .
One is on the same server as Home Assistant. All 3 systems are in Docker containers in host network mode.

Home Assistant has node red integration.

The system that shares the same server, specifying home assistant as the same ip address shows event nodes as running, unless they show the last value returned.

The other system shows the event nodes as “connecting”, yet they do return values, and then return to “connecting”.

Can anyone recognise this problem, and if so, if there is a way to fix it?

Thanks!

Brian

Do you have the Node Red Companion installed via HACS?

Did you create 2 different long lived access tokens and different users?

Yes I do. Would it work at all without it?

image

No, they are both using the same token. How do you mean “different users” ?

Thanks for helping, by the way!

Oooh, that’s an interesting one. could be the instances are confused.

@bwims I think some parts work, I’m not that familiar with the nuances, though.

This is likely the problem. Each should have it’s own token.

It’s been a while since I installed NR, some addon’s need it’s own user in HA. NR does not seem to need one. Just add a token and change it on one of the instances.

Thanks, but that does not seem to be it.

However, I noticed that this condition was associated with the following error in the HA log:

2022-06-10 15:02:59 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 334, in data_received messages, upgraded, tail = self._request_parser.feed_data(data) File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"

After stopping and starting, the condition appears to have cleared itself! And the HA error log too.

It must be because I have been fooling around trying to make SSLs work, yet I’m sure after removing the relevant pieces of code from configuration.yaml I had restarted at least once, if not twice. Weird!

I should say that both NR systems have been running with the same token weeks previously before this funny came up. Lucky me then!

Thanks for helping though!