Ray init failed, but ray status success

I have created a ray by docker on a machine. When running ray status, it prints successfully. But when running ray.init() in the python code, it comes up with – Can’t find a node_ip_address.json file from /tmp/ray/session_2023-10-15_07-38-15_725441_7. Have you started Ray instsance using ray start or ray.init?

Can you try ray.init(address="ip:port") to see if that solves the problem?

I have the same problem, ray.init(address=“ip:port”) doesn’t work.

It seems that no node_ip_adress.json exists in tmp dir.

In my temp dir, there is only node_ip_address.json.lock exists. Is it normal?

When I launch ray cluster in Conda rather than Docker, session_lastest folder has the needed files.
I believe there are bugs when you launch ray in Docker?

Thanks for any reply!

I had the same issue. Turns out you need to mount /tmp to the docker container that ray is using. You can do this in the yaml file if you use ‘ray up ’. After that the ray cluster started successfully for me.
Sadly the default example config in github does not have it: ray/python/ray/autoscaler/local/example-full.yaml at eacc763c84d47c9c5b86b26a32fd62c685be84e6 · ray-project/ray · GitHub

Just add:
- -v /tmp:/tmp