一次socket.error: [Errno 99] Cannot assign requested address报错排查

in 技术 with 0 comment

今天在阿里云国际版的机器上配置某个不可描述的服务时,遇到了 socket.error: [Errno 99] Cannot assign requested address 的错误,详细如下:

Traceback (most recent call last):
  File "/usr/bin/ssserver", line 11, in <module>
    load_entry_point('shadowsocks==2.8.2', 'console_scripts', 'ssserver')()
  File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 68, in main
    tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
  File "/usr/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 582, in __init__
    server_socket.bind(sa)
  File "/usr/lib64/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)

原先以为是resolver的问题,但是指定了Google的nameservers仍然无解,于是想到可能是服务器IP地址设置的问题,因为阿里云默认给网卡绑定的是内网IP地址。

于是修改某服务的配置文件中的Server IP为 0.0.0.0,再启动服务,问题解决。

Responses