AssertionError: Module: http does not have ClientBuilder


I’m trying to deploy Ray Serve 2.7.0 to a cluster running on a VM in AWS for the first time. I get the following error running serve run -a $RAY_ADDRESS serve.yml:

Traceback (most recent call last):
  File "/Users/daniel/src/api-venv/bin/serve", line 8, in <module>
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/click/", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/click/", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/click/", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/click/", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/click/", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/ray/serve/", line 479, in run
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/ray/_private/", line 103, in wrapper
    return func(*args, **kwargs)
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/ray/_private/", line 1336, in init
    builder = ray.client(address, _deprecation_warn_enabled=False)
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/ray/", line 376, in client
    builder = _get_builder_from_address(address)
  File "/Users/daniel/src/api-venv/lib/python3.10/site-packages/ray/", line 344, in _get_builder_from_address
    assert "ClientBuilder" in dir(
AssertionError: Module: http does not have ClientBuilder.

Any help would be greatly appreciated. Thanks!

This was user-error on my part. I got it working on EC2 as follows.

  1. Spin up the remote cluster.
ray up cluster_config.yml
  1. Get a remote shell on the cluster.
ray attach cluster_config.yml
  1. From the remote shell, deploy the Ray Serve app.
serve deploy serve_config.yml