Node-Red Dashboard - Localhost:1880/ui Connection Refused / Archlinux / Raspberrypi 4

Greetings!

I have an issue with accessing the node-red dashboard on the host machine via http://localhost:1880/ui. This port is accessible via other machines on the network but when I try to access the dashboard directly on the raspberry pi touch screen i get this error. I am using weston / COG /wpe webkit to load the GUI on the raspberry pi.

I have a bash script /usr/bin/dashboard that uses COG to display the app:

#!/usr/bin/env sh
COG_PLATFORM_FDO_VIEW_FULLSCREEN=1 cog -P fdo http://localhost:1880/ui

I have alternatively tried to use the ip address instead of localhost and I get

Could not connect. Network is unreachable

The weston configuration is: /home/alarm/.config/weston.ini its contents are as follows:

core]
idle-time=0
require-input=false

[shell]
client=/usr/bin/dashboard ------>my bash script...
animation=none
close-animation=none
startup-animation=none
locking=false

[output]
name=
mode=

my network is configured using the network manger configured with a static ip of 10.0.0.10 using the wlan0 interface.

If I change change the target in in my ssh stcript to any other public site it works so I think it must something to do with the routing or maybe a firewall but I'm not sure how to determine the cause.

Below are some commands that I ran and their respective output in an attempt to learn more but I am not an expert on network configurations by any means.

ip route

result:

default via 10.0.0.1 dev wlan0 proto static metric 600
10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.10 metric 600
sudo netstat -tnlp | grep :1880

result:

tcp    0   0 0.0.0.0:1880   0.0.0.0:*    LISTEN   277/node-red

or....

sudo netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      266/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      297/sshd: /usr/bin/
tcp        0      0 0.0.0.0:1880            0.0.0.0:*               LISTEN      277/node-red
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      266/systemd-resolve
tcp6       0      0 :::22                   :::*                    LISTEN      297/sshd: /usr/bin/
tcp6       0      0 :::5355                 :::*                    LISTEN      266/systemd-resolve

and lastly...

iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

How do I make that ip reachable on the host machine?

Thanks!

Which ip address specifically ? Did you try 127.0.0.1 ?
What do you get when you enter ifconfig in your CLI ? Do you see the interface lo (localhost) ?

Hi @Andrei,

I tried both the 127.0.0.1 and my static ip of 10.0.0.10 that I have configured with the Network Manger. 127.0.0.1 gives me: connection refused and 10.0.0.10 gives me: network is unreachable. (problem only exists on the machine that is hosting node-red, I can access both the editor and dashboard from any other machine on my network by using entering http://10.0.0.10:1880 (editor) http://10.0.0.10:1880/ui (dashboard) in a browser.

The output of ifconfig:

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:a6:32:57:25:ca  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 46  bytes 4266 (4.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 46  bytes 4266 (4.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.10  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::a6de:ada4:94b7:bdab  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:57:25:cb  txqueuelen 1000  (Ethernet)
        RX packets 85  bytes 10814 (10.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 149  bytes 24116 (23.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Thanks!

I wonder if you are facing the same issue from this post. Briefly, the case was browser initiating and trying to load the dashboard before Node-Red was loaded.

1 Like

@Andrei!!!

Spot on sir!. Thank you I was getting ready to thow in the towel on that setup!

#!/usr/bin/env sh
sleep 5
COG_PLATFORM_FDO_VIEW_FULLSCREEN=1 cog -P fdo http://localhost:1880/ui

That did the trick!

3 Likes

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