Posted by @registaz:
Hi all, I am trying to access the openRMF web with another PC connected to the host of the server, but I am not able to see any map / fleet details. Is there a need for a user login to be able to see these details on another PC ? if so, what is the port number to access the login page? Thanks!
Chosen answer
Answer chosen by @registaz at 2023-09-22T01:52:44Z.
Answered by @registaz:
Hi @aaronchongth, resolved on my side. There was another config file that uses 127.0.0.1 IP that needs to be changed.
Posted by @aaronchongth:
Hello @registaz! May I ask what your setup is like? (OS, RMF deployment, etc). When you mean host of the server, do you mean the machine running the API server? I assume the dashboard looks empty without any single piece of information from the server?
The port is 8000
, so you should follow the steps here https://github.com/open-rmf/rmf-web/tree/main/packages/dashboard#environment-variables, to direct the dashboard to the api-server.
One sanity check, if you build and run the dashboard on default configurations on the same machine as the API server, it should use local host, and they should be connected.
Posted by @registaz:
HI @aaronchongth, so my setup right now is that I have 1 PC running the API Server, this PC is able to view all information on the dashboard without a problem. The problem is when the 2 PC opens up the website, http://[(IP of PC1):3000]/, the dashboard shown is empty with no information from the server.
By accessing API server IP with port 8000, browser shows that site cant be reached.
Posted by @registaz:
How should I change the environment values in this case? Is there a file specifically for this configuration?
Posted by @aaronchongth:
Since the dashboard is shown, but not all the information from the API server, I would assume it has something to do with your network configuration or a firewall. Could you check by disabling any firewalls or network security you may be running?
Depending on your network setup, you may even need to configure your router to handle internal LAN forwarding
Posted by @registaz:
Hi @aaronchongth , dashboard is shown but not the maps or other data available. firewalls are all disable. I have been using a hotspot to try to get all of these working
Posted by @registaz:
This is what I am getting on my other device within the same network connection
Posted by @aaronchongth:
I think I have an idea where the problem lies now, check out https://github.com/open-rmf/rmf-web/tree/main/packages/dashboard#environment-variables on the environment variables needed when building the dashboard package, this points all build frontends to the server.
These are some example default values, rmf-web/packages/dashboard/.env at c885e3df14c4377273e6abbdffcfde106863c534 · open-rmf/rmf-web · GitHub, and hence when you run the frontend on your other device, it is still trying to access localhost:8000
, while it should have been SERVER_MACHINE_IP:8000
.
What you’ll need to do, is to set up the environment variables to be your server machine’s IP, before building the dashboard package, and serving it. After these steps, the dashboard running on the server’s machine will look for SERVER_MACHINE_IP:8000
, and running additional frontends on other machines in the same network will also be working with SERVER_MACHINE_IP:8000
.
Posted by @aaronchongth:
This is how it looks like in our example deployment package, https://github.com/open-rmf/rmf_deployment_template/blob/main/rmf-web/rmf-web-dashboard.Dockerfile#L11-L17 where we use the absolute URL of the server, instead of something relative like localhost
Edited by @aaronchongth at 2023-09-19T06:09:20Z
Posted by @registaz:
Thank you for your reply @aaronchongth! Let me just be sure of my understanding of these variables that
REACT_APP_RMF_SERVER= “Should be the IP/absolute url of the API SERVER”
What abour the REACT_APP_TRAJECTORY_SERVER ?
Posted by @registaz:
I’ve changed the address but im still getting connection refused.
Posted by @aaronchongth:
REACT_APP_TRAJECTORY_SERVER
targets the trajectory server of open-rmf where it uses the port 8006 by default.
We can look into it a little more if you can provide some more information about your system setup, are both machines running ubuntu?
Posted by @registaz:
The machine hosting the API server is running on Ubuntu 20.04, no issues viewing the web on this machine.
Other machine is running on windows,
Posted by @registaz:
Do I need any form of authentication to access the dashboard from another PC ?
Posted by @registaz:
Hi @aaronchongth, resolved on my side. There was another config file that uses 127.0.0.1 IP that needs to be changed.
This is the chosen answer.