shadowsocks-libev 3.1.0
Ubuntu 16.04 x86_64
service shadowsocks-libev stop
git pull
./autogen.sh && ./configure && make
make install
service shadowsocks-libev start
start normally
root@default:~# netstat -lnp
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:28839 0.0.0.0:* LISTEN 263/sshd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 150/rpcbind
tcp6 0 0 :::28839 :::* LISTEN 263/sshd
tcp6 0 0 :::111 :::* LISTEN 150/rpcbind
udp 0 0 0.0.0.0:750 0.0.0.0:* 150/rpcbind
udp 0 0 0.0.0.0:111 0.0.0.0:* 150/rpcbind
udp6 0 0 :::750 :::* 150/rpcbind
udp6 0 0 :::111 :::* 150/rpcbind
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name P ath
unix 2 [ ACC ] STREAM LISTENING 2630460699 1/init /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 2631081793 321/0 /tmp/ssh-vVWhjfuknI/agent.321
unix 2 [ ACC ] SEQPACKET LISTENING 2630460727 1/init /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 2630460730 1/init /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 2633227267 388/1 /tmp/ssh-u6sOcJuUO3/agent.388
unix 2 [ ACC ] STREAM LISTENING 2634601877 4330/2 /tmp/ssh-51YcVpR9a4/agent.4330
unix 2 [ ACC ] STREAM LISTENING 2630461838 1/init /run/rpcbind.sock
no port 521 is displayed
{
"server":"0.0.0.0",
"server_port":521,
"local_port":1080,
"password":"*",
"timeout":60,
"method":"aes-256-cfb"
}
端口号小于1024,请使用root账户启动。或者使用大于1024的端口。
Please post the result of ps -ef | grep ss-server.
If you install the shadowsocks-libev from the repository , the service of shadowsocks-libev will run ss-server default to use the nobody user instead of root user.
If you want the service of shadowsocks-libev run ss-server in root, you can edit the unit file of shadowsocks-libev service (you can find this file on /lib/systemd/system/shadowsocks-libev.service)
root@default:~# ps -ef | grep ss-server
root 21384 21372 0 01:16 pts/2 00:00:00 grep --color=auto ss-server
@yingziwu
[Unit]
Description=Shadowsocks-libev Default Server Service
Documentation=man:shadowsocks-libev(8)
After=network.target
[Service]
Type=simple
EnvironmentFile=/etc/default/shadowsocks-libev
User=root
Group=root
LimitNOFILE=32768
ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS
@yingziwu modify like this?
Still no 521 port is displayed after changing like above
root@default:~# netstat -lnp
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:111 0.0.0.0:* LISTEN 155/rpcbind
tcp 0 0 0.0.0.0:28839 0.0.0.0:* LISTEN 265/sshd
tcp6 0 0 :::111 :::* LISTEN 155/rpcbind
tcp6 0 0 :::28839 :::* LISTEN 265/sshd
udp 0 0 0.0.0.0:111 0.0.0.0:* 155/rpcbind
udp 0 0 0.0.0.0:755 0.0.0.0:* 155/rpcbind
udp6 0 0 :::111 :::* 155/rpcbind
udp6 0 0 :::755 :::* 155/rpcbind
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name P ath
unix 2 [ ACC ] STREAM LISTENING 2643363087 1/init /run/systemd/private
unix 2 [ ACC ] SEQPACKET LISTENING 2643363110 1/init /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 2643363113 1/init /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 2643365050 1/init /run/rpcbind.sock
root@default:~# vim /lib/systemd/system/shadowsocks-libev.service
root@default:~# service shadowsocks-libev start
root@default:~# netstat -lnp
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:111 0.0.0.0:* LISTEN 155/rpcbind
tcp 0 0 0.0.0.0:28839 0.0.0.0:* LISTEN 265/sshd
tcp6 0 0 :::111 :::* LISTEN 155/rpcbind
tcp6 0 0 :::28839 :::* LISTEN 265/sshd
udp 0 0 0.0.0.0:111 0.0.0.0:* 155/rpcbind
udp 0 0 0.0.0.0:755 0.0.0.0:* 155/rpcbind
udp6 0 0 :::111 :::* 155/rpcbind
udp6 0 0 :::755 :::* 155/rpcbind
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name P ath
unix 2 [ ACC ] STREAM LISTENING 2643363087 1/init /run/systemd/private
unix 2 [ ACC ] SEQPACKET LISTENING 2643363110 1/init /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 2643363113 1/init /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 2643365050 1/init /run/rpcbind.sock
Yes, your modify is right.
But your operating system is Ubuntu 16.04 x86_64, the default init software of Ubuntu 16.04 x86_64 is systemd.
If you not change your init software (eg. change your init software to SysVinit), you should use sudo systemctl start shadowsocks-libev.service
to start the service.
After start the service, you can use sudo systemctl status shadowsocks-libev.service to see the status of shadowsocks-libev service. If you want to the service of shadowsocks-libev start on boot, you can sudo systemctl enable shadowsocks-libev.service
@yingziwu
Thank you. I think I am almost there.
After two commands, error shows below.
What does it mean?
root@default:~# systemctl start shadowsocks-libev.service
root@default:~# systemctl status shadowsocks-libev.service
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
Loaded: loaded (/lib/systemd/system/shadowsocks-libev.service; disabled; vend
Active: failed (Result: exit-code) since Wed 2017-09-27 03:48:43 EDT; 11s ago
Docs: man:shadowsocks-libev(8)
Process: 500 ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS (code=exit
Main PID: 500 (code=exited, status=255)
Sep 27 03:48:43 default systemd[1]: Started Shadowsocks-libev Default Server Ser
Sep 27 03:48:43 default ss-server[500]: 2017-09-27 03:48:43 ERROR: 6:0: Expecte
Sep 27 03:48:43 default systemd[1]: shadowsocks-libev.service: Main process exit
Sep 27 03:48:43 default systemd[1]: shadowsocks-libev.service: Unit entered fail
Sep 27 03:48:43 default systemd[1]: shadowsocks-libev.service: Failed with resul
lines 1-12/12 (END)
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
Loaded: loaded (/lib/systemd/system/shadowsocks-libev.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2017-09-27 03:48:43 EDT; 11s ago
Docs: man:shadowsocks-libev(8)
Process: 500 ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS (code=exited, status=255)
Main PID: 500 (code=exited, status=255)
Sep 27 03:48:43 default systemd[1]: Started Shadowsocks-libev Default Server Service.
Sep 27 03:48:43 default ss-server[500]: 2017-09-27 03:48:43 ERROR: 6:0: Expected , before "
Sep 27 03:48:43 default systemd[1]: shadowsocks-libev.service: Main process exited, code=exited, status=255/n/
Sep 27 03:48:43 default systemd[1]: shadowsocks-libev.service: Unit entered failed state.
Sep 27 03:48:43 default systemd[1]: shadowsocks-libev.service: Failed with result 'exit-code'.
Sep 27 03:48:43 default ss-server[500]: 2017-09-27 03:48:43 ERROR: 6:0: Expected , before "
从这行来看你配置文件语法错了
Thanks the issue is solved @yingziwu @wongsyrone
Most helpful comment
Yes, your modify is right.
But your operating system is
Ubuntu 16.04 x86_64, the default init software ofUbuntu 16.04 x86_64issystemd.If you not change your init software (eg. change your init software to
SysVinit), you should usesudo systemctl start shadowsocks-libev.serviceto start the service.After start the service, you can use
sudo systemctl status shadowsocks-libev.serviceto see the status of shadowsocks-libev service. If you want to the service of shadowsocks-libev start on boot, you cansudo systemctl enable shadowsocks-libev.service