2问题模板
【Ray版本和类库】ray-2.3.1 python-3.9
【使用现场和问题复现】通过Ray官方文档 Getting Started Guide — Ray 2.3.1 中的 [ray-api] 和 [ray-runtime] 依赖进行测试,由于本地Redis占用了6739端口,希望能找到办法在ray.init()时指定端口
【尝试过程】
借鉴在python中设置address的方法,我尝试采用System.setProperty()进行设置
public static void main(String[] args) {
// Intialize Ray runtime.
System.setProperty("ray.address", "127.0.0.1:6400");
Ray.init();
}
但遇到了端口阻塞的问题,猜测是底层grpc端口并没有被更改,最终连接超时运行失败
报错如下:
[2023-04-04 17:09:46,087 E 84454 3534076] gcs_rpc_client.h:203: Failed to connect to GCS at address 127.0.0.1:6378 within 5 seconds.
[2023-04-04 17:10:41,117 E 84454 3534160] gcs_rpc_client.h:533: Failed to connect to GCS within 60 seconds. GCS may have been killed. It’s either GCS is terminated by ray stop
or is killed unexpectedly. If it is killed unexpectedly, see the log file gcs_server.out. Logging — Ray 3.0.0.dev0. The program will terminate.