October upgrade breaks daemons

I got this on one of my daemons after upgrading today:

$ sudo systemctl status shadowsocks-libev.service 
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
   Loaded: loaded (/lib/systemd/system/shadowsocks-libev.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-10-21 16:00:37 +0330; 14s ago
     Docs: man:shadowsocks-libev(8)
  Process: 354 ExecStart=/usr/bin/ss-local -c $CONFFILE $DAEMON_ARGS (code=exited, status=218/CAPABILITIES)
 Main PID: 354 (code=exited, status=218/CAPABILITIES)

اكتبر 21 16:00:37 vero systemd[1]: Started Shadowsocks-libev Default Server Service.
اكتبر 21 16:00:37 vero systemd[354]: shadowsocks-libev.service: Failed to apply ambient capabilities (before UID change): Invalid argument
اكتبر 21 16:00:37 vero systemd[354]: shadowsocks-libev.service: Failed at step CAPABILITIES spawning /usr/bin/ss-local: Invalid argument
اكتبر 21 16:00:37 vero systemd[1]: shadowsocks-libev.service: Main process exited, code=exited, status=218/CAPABILITIES
اكتبر 21 16:00:37 vero systemd[1]: shadowsocks-libev.service: Failed with result 'exit-code'.

It’s either caused by systemd upgrade or the kernel. I found a similar thread on Archlinux here: [ArchLinux] systemd upgrade breaks daemons [SOLVED] - ODROID

I’ll check this shortly.

1 Like

I looked a bit into this and maybe that’s because of network capabilities in the new kernel.

Because the ambient caps in the service is CAP_NET_BIND_SERVICE
And when I run the shadowsocks-libev manually, I get this error:

ERROR: failed to set TCP_FASTOPEN_CONNECT

I was using this packages for years in my Vero 4K before.

Which kernel are you using? 3.14 or 4.9?

Are you sure the systemd unit hasn’t changed?

3.14.29-160-osmc

Yes. I checked the unit with my backup file.

The kernel configuration is unchanged from before.

Thanks to your question, I just upgraded Linux to 4.9 and now it’s working fine! :smiley: