Ray Dashboard cannot be accessed in the host browser

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

I used the Docker image rayproject/ray from the official website, and start the container with:

docker run --shm-size=3G -dit -p 8265:8265 -p 8888:8888 --name raytest001 rayproject/ray

I run this script in the container machine:

import ray
ray.init()

It said Ray is launched successfully, but I cannot reach the dashboard in the Host browser: http://172.17.0.2:8265 (I confirmed the IP is correct).

I also tried this command:

ray start --head --dashboard-host "0.0.0.0"

The output said:

Usage stats collection will be enabled by default in the next release. See (github link) for more details.
Local node IP: 172.17.0.2
2022-05-29 19:40:44,187 INFO services.py:1462 – View the Ray dashboard at http://172.17.0.2:8265


Ray runtime started.

Next steps
To connect to this Ray runtime from another node, run
ray start --address=‘172.17.0.2:6379’

Alternatively, use the following Python code:
import ray
ray.init(address=‘auto’)

To connect to this Ray runtime from outside of the cluster, for example to
connect to a remote cluster from your laptop directly, use the following
Python code:
import ray
ray.init(address=‘ray://<head_node_ip_address>:10001’)

If connection fails, check your firewall settings and network configuration.

To terminate the Ray runtime, run
ray stop

Looks fine for me, but still the dashboard is not accessible outside the container. What should I do?

guess you should use ‘–dashboard-host=0.0.0.0’

Invalid syntax. In the ray start --help, it said:

--dashboard-host TEXT           the host to bind the dashboard server to,
                                  either localhost (127.0.0.1) or 0.0.0.0
                                  (available from all interfaces). By default,
                                  thisis localhost.

@shivanraptor I tried the docker approach and was able to access the dashboard as well. Reference: GitHub - dudeperf3ct/16-rayserve-deploy

127.0.0.1:8265 to access ray dashboard.

Tried http://127.0.0.1:8265, empty response.

http://172.17.0.2:8265, connection timed out.

@shivanraptor I tried it locally with

ray start --head --dashboard-host "0.0.0.0"

and I can access the dashboard from my host browser. I think maybe there is some config issue in your docker env.

2 Likes

How’s the command helps, I still got time out using ‘–dashboard-host “0.0.0.0”’