when opening the NodeRED web interface via http://hostname:1880, I often get "this server cannot be reached" on first try, while refreshing/2nd try gets it loading smoothly.
NodeRED: 4.1.4 on Raspberry/Debian 13
Node.JS: v20.20.0
Accessing browser: Firefox 140.7.0esr on Debian 13
Access path: http://pi1:1880 (wherein pi1 is the hostname of the machine with NodeRED in the local network)
Other web interfaces in the local network do answer in first try, therefore i dare to ask: did anyone encounter this too? I fear, have to hunt it with Wireshark otherwise.
... ouff ok, and browser Chromium gets its (apparently) on first try. Think i have to come back to this thread after wiresharking locally and on the (NodeRED-)Raspberry.
Exactly, closing the browser and re-opening it is sufficient to reproduce. Why this is particular to NodeRED: such issues were not experienced for any other web page, neither in global internet nor in local network.
The exact firefox display, in german:
"Verbindung fehlgeschlagen
Firefox kann keine Verbindung zu dem Server unter pi1:1880 aufbauen. [...]"
Don't know the exact in English Firefox, should be connection not possible, or connection time-out.
To get it even more weird: with browser Chromium it is not happening. So ... just due to the fact that this is only observed for accessing NodeRed, remains a bit mysterious.
Opened Chromium, entered http://pi1:1880/ in address bar - instantly loaded, left Chromium open
Opened Firefox, entered http://pi1:1880/ in address bar - no connection
"Refresh" in Firefox - Page did load
As a variation, I did load in step 2 a Dashboard 2.0 page coming from same NodeRED in Chromium and did leave that "running" to keep the connection densely alive. But outcome of step 3 (no connection) did stay.
At first: apologies, i should have gone further on my side. Think its understood now, using Wireshark/TShark on the Raspberry.
The DNS of the local network was having local IPv4 and v6 addresses of the Raspberry. Firefox was first trying to connect on the v6, which NodeRED was not configured to answer on. Second try was going (successfully) to the v4 address.
Added uiHost: "::", to the settings.js did fix it, NodeRED now also answering the connection attempts received on the v6 address. Ouff...
Continuing on v6, I learned now (from an AI... at least it is claiming the following ) that IPv6 addresses might be exposed globally in older routers/early IPv6 stacks even without explicit opening of the port to the outside, as the device IPv6 address can anyhow be read as a global address. (Therefore, it is not subject of "port forwarding" as in IPv4.) In that case, the aforementioned v6 acceptance would be a clear security threat.