Can't access dashboard (rpi/docker)

Hello
I have just managed to run 3rd node. This time it is Raspberry Pi using Docker. I don’t have much experience with docker so sorry for stupid questions :slight_smile:.
I started with following command (please note -p 14003:14003 instead of 127.0.0.1:14003:14003. I am also using 28963 port as 28961 and 28962 are for 1st and 2nd node):
docker run -d --restart unless-stopped --stop-timeout 300 -p 28963:28967 -p 14003:14003 -e WALLET="xxx" -e EMAIL="xxx" -e ADDRESS="xxx:28963" -e STORAGE="xxx" --mount type=bind,source=/home/pi/identity,destination=/app/identity --mount type=bind,source=/mnt/sda1/storj,destination=/app/config --name storagenode storjlabs/storagenode:latest

I am sure node is running:
$ docker exec -it storagenode /app/dashboard.sh

Storage Node Dashboard ( Node Version: v1.18.1 )

======================

ID     121Fqa9YvgWtja2jTDW3MzcNSLokkfApeu7SGE4TqgtKRaiqava
Status ONLINE
Uptime 29m54s

                   Available         Used     Egress      Ingress
     Bandwidth           N/A     38.99 MB        0 B     38.99 MB (since Dec 1)
          Disk     499.96 GB     38.63 MB
Internal 127.0.0.1:7778
External xxx:28963

There are no errors when I run
docker logs storagenode

But I cannot access dashboard:

pi@raspberrypi:~ $ curl 127.0.0.1:14003
curl: (56) Recv failure: Connection reset by peer
pi@raspberrypi:~ $ curl 192.168.1.4:14003
curl: (7) Failed to connect to 192.168.1.4 port 14003: Connection refused


pi@raspberrypi:~ $ docker ps
CONTAINER ID   IMAGE                          COMMAND         CREATED          STATUS          PORTS                                                NAMES
8d529cb435ff   storjlabs/storagenode:latest   "/entrypoint"   39 minutes ago   Up 39 minutes   0.0.0.0:14003->14003/tcp, 0.0.0.0:28963->28967/tcp   storagenode

Could you please help?

You may use whichever port you want on your host (left hand-side of the redirection), but ports are fixed within the docker container (right hand-side of the redirection).
So it’ll always be 28967 for the Node service, and 14002 for the web dashboard, inside the container.

You did it the right way for the Node service port; so you need to do it in a similar way for the webdashboard: you need to redirect port 14003 (host) to port 14002 (docker).

Like this in your case: -p 14003:14002

1 Like

Thanks, that worked :slight_smile: Didn’t know I had to redirect dashboard ports too. Like I said - I don’t know docker so I am glad I’ve learned something new

Glad it fixed the issue! :+1:

When using -p XXX:YYY you’re basically telling docker to connect port XXX on your host to port YYY within the docker container.

So YYY will always be whatever ports are being listened to within the container ( 28967 & 14002 in this case): they cannot be chosen.

But you’re free to choose whatever valid and free port you want for XXX.

Here is an example for multiple nodes (for local access only, for security reasons):

Node Port XXX (host - you may change these) Port YYY (within docker - you may not change these) Corresponding docker parameter
my_node_1_api 28001 28967 -p 127.0.0.1:28001:28967
my_node_2_api 28002 28967 -p 127.0.0.1:28002:28967
my_node_3_api 28003 28967 -p 127.0.0.1:28003:28967
my_node_1_web 8081 14002 -p 127.0.0.1:8081:14002
my_node_2_web 8082 14002 -p 127.0.0.1:8082:14002
my_node_3_web 8083 14002 -p 127.0.0.1:8083:14002

… and so on.

I would like to suggest you to close the 14003 for outside, i.e. replace the -p 14003:14002 back to -p 127.0.0.1:14003:14002 and use a remote access instead (you will use a ssh anyway unless you have a dedicated monitor and keyboard for your Pi): https://documentation.storj.io/resources/faq/how-to-remote-access-the-web-dashboard

1 Like

Good point @Alexey :+1:
I edited my post to reflect that.

1 Like