1

On Ubuntu service, I want to setup shadowsocks service. I used the following command in order to install this package:

$ pip install shadowsocks

and then

$ ssserver -c /etc/Shadowsock.json

whereas the latter is giving me the following error:

$ ssserver -c /etc/Shadowsock.json 
INFO: loading config from /etc/Shadowsock.json
2018-11-16 16:06:44 INFO     loading libcrypto from libcrypto.so.1.1
2018-11-16 16:06:44 INFO     starting server at 3.0.103.80:8388
Traceback (most recent call last):
  File "/usr/local/bin/ssserver", line 11, in <module>
    load_entry_point('shadowsocks==3.0.0', 'console_scripts', 'ssserver')()
  File "/usr/local/lib/python2.7/dist-packages/shadowsocks/server.py", line 74, in main
    tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
  File "/usr/local/lib/python2.7/dist-packages/shadowsocks/tcprelay.py", line 754, in __init__
    server_socket.bind(sa)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address

The /etc/Shadowsocks.json is below

{
  "server":"3.0.103.80",
  "server_port":8388,
  "local_address":"127.0.0.1",
  "local_port":1080,
  "password":"dmlsgdsbhhh",
  "timeout":300,
  "method":"aes-256-cfb",
  "fast_open": false
}

Can anybody help me to investigate what may be the cause for this exception?

rishat
  • 8,206
  • 4
  • 44
  • 69
cuijier
  • 21
  • 3
  • 1
    Possible duplicate of [socket.error:\[errno 99\] cannot assign requested address and namespace in python](https://stackoverflow.com/questions/19246103/socket-errorerrno-99-cannot-assign-requested-address-and-namespace-in-python) – Tabin1000 Nov 16 '18 at 16:36
  • anybody can give some suggest? – cuijier Nov 17 '18 at 03:18
  • maybe you can change server value in /etc/Shadowsocks.json to localhost and test if it works – Tabin1000 Nov 17 '18 at 06:07

1 Answers1

-2
"server":"0.0.0.0",
Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
  • 3
    It's better to add some details around your answer. – Gaurav Jeswani Aug 31 '20 at 04:50
  • The answer is correct. More explanation certainly could have helped. Basically if you're starting the server program, the "server address" would naturally be the localhost, instead of the public IP of the VPS. – xji Jan 04 '23 at 11:20