Unable to connect with ray head node in VirtualBox

670 Views Asked by At

I'm trying to run ray head node on a VirtualBox(lubuntu18.04) with the command ray start --head --port='2121' 2121 is the port forwarding port I get a normal ray runtime message. From my local machine, I'm initializing ray as

ray.init(address='auto', redis_password='5241590000000000')

It is unable to detect ray. It raises the error.

Traceback (most recent call last):
  File "pyremotescrip.py", line 10, in <module>
    ray.init(address='auto', redis_password='5241590000000000')
  File "/home/jatin/.local/lib/python3.8/site-packages/ray/worker.py", line 653, in init
    redis_address, _, _ = services.validate_redis_address(
  File "/home/jatin/.local/lib/python3.8/site-packages/ray/services.py", line 276, in validate_redis_address
    address = find_redis_address_or_die()
  File "/home/jatin/.local/lib/python3.8/site-packages/ray/services.py", line 167, in find_redis_address_or_die
    raise ConnectionError(
ConnectionError: Could not find any running Ray instance. Please specify the one to connect to by setting `address`.

I checked port forwarding by running the following code on virtualbox

python -m http.server 2121

In the local machine, I was able to see the files in the folder using localhost:2121 Hence, the port forwarding seems to be working fine. I'm unable to spot the mistake in the ray.init() command. I assumed address='auto' should be able to detect ray. But it does not seem to work

0

There are 0 best solutions below