Acris / shadowsocks-asuswrt-merlin

Shadowsock for Asuswrt-Merlin New Gen
MIT License
255 stars 44 forks source link

ERROR: bind: Address already in use #32

Closed karpender closed 4 years ago

karpender commented 4 years ago

你好,感谢开发这个功能,有以下问题请教:

ss-merlin start 启动服务,不能正常翻墙。

ss-redir -c /opt/share/ss-merlin/etc/shadowsocks/config.json 有报错:

 2020-03-01 11:41:00 ERROR: bind: Address already in use
 2020-03-01 11:41:00 ERROR: bind() error

config.json 文件如下:

{
  "server": "xxx.xxx.xxx",
  "server_port": 11368,
  "local_address": "0.0.0.0",
  "local_port": 1080,
  "password": "xxxxxxxx",
  "timeout": 600,
  "method": "chacha20-ietf-poly1305",
  "mode": "tcp_and_udp",
}

请问是什么原因?谢谢!

Acris commented 4 years ago

应该是1080端口被占用,可以尝试重启路由器,或者将配置文件中的local_port更换为别的端口。

Acris commented 4 years ago

从你描述来看,执行ss-redir -c /opt/share/ss-merlin/etc/shadowsocks/config.json之前有执行ss-merlin stop吗?如果没有的话应该是之前启动的进程占用了。

karpender commented 4 years ago

感谢回复,确实之前没执行ss-merlin stop

执行ss-merlin stop后,再执行ss-redir -c /opt/share/ss-merlin/etc/shadowsocks/config.json,输出信息如下:

 2020-03-01 13:51:24 INFO: initializing ciphers... chacha20-ietf-poly1305
 2020-03-01 13:51:24 INFO: listening at 0.0.0.0:1080
 2020-03-01 13:51:24 INFO: UDP relay enabled
 2020-03-01 13:51:24 INFO: running from root user
karpender commented 4 years ago

可能是加密方式不对,修改了"method": "chacha20-ietf-poly1305","method": "chacha20-ietf",,终于可以了。非常感谢!