ray:安装anyscale-academy教程抛出socket异常

问题描述

安装ray,分布式ML框架时,我在centOS 8.2的VM上安装ray 1.0.1post。我一步一步地按照 the official document 操作,我发出启动教程网络服务器的命令:

> jupyter lab

我遇到了异常,类似如下:

"/usr/lib64/xxx/tornado/netutil.py",line 196,in bind_sockets sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address

如何修复此异常?

解决方法

这个异常与ray无关,因为CentOS默认允许部分IPv4、IPv6,所以要么启用IPv6,要么明确禁用IPv6。有用。还需要关闭firewalld让外部客户端访问VM Web服务器。

以下命令有助于启用 IPv6,

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0

以下命令停止firewalld:

systemctl status firewalld
systemctl stop fiewalld

如果在status命令中:看到running关键字表示firewalld正在运行,停止后看到关键字dead:

Running:
 Active: active (running) since Fri 2021-03-19 10:17:27 CST; 4 days ago  
Dead: 
 Active: inactive (dead) since Tue 2021-03-23 10:58:10 CST; 3s ago