Serve run cli to remote

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

  • High: It blocks me to complete my task.

I tried running

serve run --address capitalizer:capitalizer_app

, where capitalizer:capitalizer_app is a very simple ray serve app that capitalizes. However, I get the following error:

Traceback (most recent call last):
  File "/Users/ammar.alrashed/code/ray_versions/ray_271/lib/python3.8/site-packages/ray/_private/", line 1598, in init
    _global_node = ray._private.node.Node(
  File "/Users/ammar.alrashed/code/ray_versions/ray_271/lib/python3.8/site-packages/ray/_private/", line 156, in __init__
  File "/Users/ammar.alrashed/code/ray_versions/ray_271/lib/python3.8/site-packages/ray/_private/", line 729, in _init_gcs_client
    raise RuntimeError(
RuntimeError: Failed to connect to GCS.

Does anyone know what the problem is?

serve run uses the Ray client address, instead of the dashboard address. The Ray client address format is ray://[hostname]:[head node port]. By default, the head node port is 10001.

In your example, the address is likely:


By the way, are you trying to connect to a remote cluster? That ip address (10…) points to a node on the local network, so it won’t work if you’re trying to a connect to a remote cluster. In that case, you would need to use a public ip or hostname.