ss 更新后无法启动的解决办法

CentOS 7

[[email protected] ~]# yum update shadowsocks-libev
[[email protected] ~]# systemctl start shadowsock-libev
[[email protected] ~]# systemctl status shadowsock-libev
Unit shadowsock-libev.service could not be found.
[[email protected] ~]# systemctl status shadowsocks-libev -l
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-06-11 22:07:13 CST; 47min ago
Docs: man:shadowsocks-libev(8)
Process: 3726 ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS (code=exited, status=127)
Main PID: 3726 (code=exited, status=127)
Jun 11 22:07:13 li582-129.members.linode.com systemd[1]: Started Shadowsocks-libev Default Server Service.
Jun 11 22:07:13 li582-129.members.linode.com systemd[1]: Starting Shadowsocks-libev Default Server Service...
Jun 11 22:07:13 li582-129.members.linode.com ss-server[3726]: /usr/bin/ss-server: error while loading shared libraries: libmbedcrypto.so.2: cannot open shared object file: No such file or directory
Jun 11 22:07:13 li582-129.members.linode.com systemd[1]: shadowsocks-libev.service: main process exited, code=exited, status=127/n/a
Jun 11 22:07:13 li582-129.members.linode.com systemd[1]: Unit shadowsocks-libev.service entered failed state.
Jun 11 22:07:13 li582-129.members.linode.com systemd[1]: shadowsocks-libev.service failed.
[[email protected] ~]#
[[email protected] ~]# ll /usr/lib64
lrwxrwxrwx 1 root root 18 Apr 11 22:24 libmbedcrypto.so -> libmbedcrypto.so.1
lrwxrwxrwx 1 root root 18 Apr 11 22:28 libmbedcrypto.so.0 -> libmbedcrypto.so.1
lrwxrwxrwx 1 root root 22 Apr 11 22:24 libmbedcrypto.so.1 -> libmbedcrypto.so.2.7.0
-rwxr-xr-x 1 root root 353944 Feb 6 23:08 libmbedcrypto.so.2.7.0
[[email protected] ~]# cd /usr/lib64/
[[email protected] lib64]# ln -s libmbedcrypto.so.1 libmbedcrypto.so.2
[[email protected] lib64]# ll
lrwxrwxrwx 1 root root 18 Apr 11 22:24 libmbedcrypto.so -> libmbedcrypto.so.1
lrwxrwxrwx 1 root root 18 Apr 11 22:28 libmbedcrypto.so.0 -> libmbedcrypto.so.1
lrwxrwxrwx 1 root root 22 Apr 11 22:24 libmbedcrypto.so.1 -> libmbedcrypto.so.2.7.0
lrwxrwxrwx 1 root root 18 Jun 11 23:03 libmbedcrypto.so.2 -> libmbedcrypto.so.1
-rwxr-xr-x 1 root root 353944 Feb 6 23:08 libmbedcrypto.so.2.7.0
[[email protected] ~]# systemctl start shadowsocks-libev
[[email protected] ~]# systemctl status shadowsocks-libev -l
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-06-11 23:04:50 CST; 8s ago
Docs: man:shadowsocks-libev(8)
Main PID: 6584 (ss-server)
CGroup: /system.slice/shadowsocks-libev.service
└─6584 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json -u
Jun 11 23:04:50 abc.members.abc.com systemd[1]: Started Shadowsocks-libev Default Server Service.
Jun 11 23:04:50 abc.members.abc.com systemd[1]: Starting Shadowsocks-libev Default Server Service...
Jun 11 23:04:50 abc.members.abc.com ss-server[6584]: 2018-06-11 23:04:50 INFO: UDP relay enabled
Jun 11 23:04:50 abc.members.abc.com ss-server[6584]: 2018-06-11 23:04:50 INFO: initializing ciphers... aes-256-cfb
Jun 11 23:04:50 abc.members.abc.com ss-server[6584]: 2018-06-11 23:04:50 INFO: tcp server listening at 11.22.33.44:8888
Jun 11 23:04:50 abc.members.abc.com ss-server[6584]: 2018-06-11 23:04:50 INFO: udp server listening at 11.22.33.44:8888
[[email protected] ~]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3350/sshd
tcp 0 0 11.22.33.44:8888 0.0.0.0:* LISTEN 6584/ss-server
tcp6 0 0 :::22 :::* LISTEN 3350/sshd
udp 0 0 127.0.0.1:323 0.0.0.0:* 3017/chronyd
udp 0 0 11.22.33.44:8888 0.0.0.0:* 6584/ss-server
udp6 0 0 ::1:323 :::* 3017/chronyd
Shadowsocks-libev 

目录

程序目录

/usr/bin/ss-server
/usr/lib/systemd/system/shadowsocks-libev.service 

配置文件目录

[[email protected] ~]# ll /etc/shadowsocks-libev/
total 4
-rw-r--r-- 1 root root 190 Apr 11 22:30 config.json 

命令

 # Start
sudo systemctl start shadowsocks-libev.service
# Stop
sudo systemctl stop shadowsocks-libev.service
# Restart
sudo systemctl restart shadowsocks-libev.service 

kcptun

目录

/usr/local/kcptun
[[email protected] ~]# ll /usr/local/kcptun/
total 15532
-rw-r--r-- 1 root root 9265516 May 10 19:39 kcptun.log
-rwxr-xr-x 1 root root 6620576 Apr 11 22:55 server_linux_amd64
-rwxr-xr-x 1 root root 171 Apr 11 22:55 start.sh
-rwxr-xr-x 1 root root 126 Apr 14 10:13 stop.sh 

命令

启动
sh /usr/local/kcptun/start.sh
关闭
sh /usr/local/kcptun/stop.sh 

首次安装时也出现了类似的错误
当时的解决方法

cd /usr/lib64
ln -s libmbedcrypto.so.1 libmbedcrypto.so.0 

参考资料

https://github.com/shadowsocks/shadowsocks-libev/issues/1966

0 Comments

发表评论

电子邮件地址不会被公开。 必填项已用*标注