3.0.7
Debian 9
trying to stop / restart the shadowsocks service
stop / restart the shadowsocks service
help page
Tried ss-server stop and ss-server restart (command for main branch of shadowsocks), however, in ss-libev, neither worked.
Is there anyway to restart the service in command line, or do I have to restart my VPS?
If you run it as service you might want to use the main service manager (rc-service for openrc, systemctl for systemd etc.). If you run it stand alone... well I personally always just
ps aux | grep ss-server
kill [$PID of ss-server]
and run again, works fine that way.
sudo service shadowsocks-libev restart
我用的这个
A systemd script is installed with the package.[https://github.com/shadowsocks/shadowsocks-libev/blob/master/debian/shadowsocks-libev-server%40.service]
You can use a simple command to manage the server. systemctl start/stop/restart/status [email protected] (Please change config to your own config name. Refer to systemd's @service if you still can't understand.)
Use journalctl -u [email protected] to view logs easily.
why does kill command not work on ss-server??
etsir@cadae:~$ ps -aux|grep ss-
root 5627 0.0 0.3 52700 3908 pts/0 T 11:09 0:00 sudo ss-server -c /etc/shadowsocks-libev/yejinshuo.json
root 5628 0.0 0.1 24852 1484 pts/0 T 11:09 0:00 ss-server -c /etc/shadowsocks-libev/yejinshuo.json
nobody 5781 0.0 0.4 24852 4296 ? Ss 11:22 0:00 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json -u
etsir 5783 0.0 0.0 14220 992 pts/0 S+ 11:22 0:00 grep --color=auto ss-
etsir@cadae:~$ sudo kill 5627
etsir@cadae:~$ ps -aux|grep ss-
root 5627 0.0 0.3 52700 3908 pts/0 T 11:09 0:00 sudo ss-server -c /etc/shadowsocks-libev/yejinshuo.json
root 5628 0.0 0.1 24852 1484 pts/0 T 11:09 0:00 ss-server -c /etc/shadowsocks-libev/yejinshuo.json
nobody 5781 0.0 0.5 24984 5072 ? Ss 11:22 0:00 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json -u
etsir 5828 0.0 0.0 14220 932 pts/0 S+ 11:27 0:00 grep --color=auto ss-
@4over7 You may use kill -9 <pid> to kill process unconditionally.
@isjerryxiao
抱歉打扰一下,您提到的几个命令我都有用,但是恰巧没有提到enable。是没有必要全部列举,还是enable命令本就不支持?
systemctl start/stop/restart/status [email protected]
start/stop/restart/status我这里都有用,但是我想要开机自启,用enable命令却不行。我现在不知道是我自己系统的问题还是ss-libev的问题。
系统是arch。我是client用的ss-libev,而不是server,所以命令是这样的:
systemctl start/... [email protected]
ref: archwiki shadowsocks说可以用enable来开机自启。
@Azureki This seems like a systemd question.
What output did you see from systemctl enable?
If possible, post the result of these commands
systemctl cat [email protected]
ls -l /etc/systemd/system/multi-user.target.wants |grep shadowsocks-libev
@isjerryxiao
抱歉,~enable没有输出~,错了,没有输出是因为我已经不是第一次enable。
输出是:
Created symlink /etc/systemd/system/multi-user.target.wants/[email protected] → /usr/lib/systemd/system/[email protected].
我忘记说了。而status的输出有Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled;。有enabled。
systemctl cat [email protected]命令输出:
# /usr/lib/systemd/system/[email protected]
[Unit]
Description=Shadowsocks-Libev Client Service
After=network-online.target
[Service]
Type=simple
User=nobody
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/ss-local -c /etc/shadowsocks/%i.json
[Install]
WantedBy=multi-user.target
ls -l /etc/systemd/system/multi-user.target.wants |grep shadowsocks-libev命令输出:
lrwxrwxrwx 1 root root 50 4月 12 21:20 [email protected] -> /usr/lib/systemd/system/[email protected]
/etc/shadowsocks文件夹下有一个文件:config-abc.json。因为ss和ss-libev使用相同的配置文件路径。
Most helpful comment
A systemd script is installed with the package.[https://github.com/shadowsocks/shadowsocks-libev/blob/master/debian/shadowsocks-libev-server%40.service]
You can use a simple command to manage the server.
systemctl start/stop/restart/status [email protected](Please change config to your own config name. Refer to systemd's @service if you still can't understand.)Use
journalctl -u [email protected]to view logs easily.