Shadowsocks-libev: ubuntu 16.04 shadowsocks-libev.service: Failed at step CAPABILITIES spawning /usr/bin/ss-server: Invalid argument

Created on 2 Mar 2019  ·  8Comments  ·  Source: shadowsocks/shadowsocks-libev

ubuntu 16.04
Current version: 3.24
shadowsocks-libev.service: Failed at step CAPABILITIES spawning /usr/bin/ss-server: Invalid argument

question

Most helpful comment

你的内核太老了。你把/usr/lib/systemd/system/[email protected]里:
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
这一行注释掉试试。

Would you mind translating this? I'd like to follow your advice :)

edit: For everyone wondering, here is my detailed solution:
If you use the service command do this:
nano /lib/systemd/system/shadowsocks-libev.service
add # in front of the two lines regarding capabilities (to comment them) as such:

#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE

Reload the config files and start service again:

systemctl daemon-reload
service shadowsocks-libev start

Also: ensure your server binary referenced in the file has the CAP_NET_BIND_SERVICE cap set, by issuing:
getcap /usr/bin/ss-server
result should be:
/usr/bin/ss-server = cap_net_bind_service+ep
if not, set it:
setcap cap_net_bind_service+ep /usr/bin/ss-server

Hope this helps!

All 8 comments

你的内核版本是?

Ubuntu 16.04.6 LTS (GNU/Linux 2.6.32-042stab112.15 x86_64)

你的内核太老了。你把/usr/lib/systemd/system/[email protected]里:
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
这一行注释掉试试。

Happens to me too.

Note: In my case, The file at /lib/systemd/system/shadowsocks-libev.service

你的内核太老了。你把/usr/lib/systemd/system/[email protected]里:
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
这一行注释掉试试。

Would you mind translating this? I'd like to follow your advice :)

edit: For everyone wondering, here is my detailed solution:
If you use the service command do this:
nano /lib/systemd/system/shadowsocks-libev.service
add # in front of the two lines regarding capabilities (to comment them) as such:

#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE

Reload the config files and start service again:

systemctl daemon-reload
service shadowsocks-libev start

Also: ensure your server binary referenced in the file has the CAP_NET_BIND_SERVICE cap set, by issuing:
getcap /usr/bin/ss-server
result should be:
/usr/bin/ss-server = cap_net_bind_service+ep
if not, set it:
setcap cap_net_bind_service+ep /usr/bin/ss-server

Hope this helps!

@reijin90 So it works now?

Was this page helpful?
0 / 5 - 0 ratings