On Fr, 29.01.21 12:30, Ulrich Windl (ulrich.wi...@rz.uni-regensburg.de) wrote:

> Hi!
>
> I wonder whether this is a bug:
> When starting a socket unit that finds ist service active already, I get an 
> error
> systemd[1]: libvirtd-tls.socket: Socket service libvirtd.service already 
> active, refusing.
> systemd[1]: Failed to listen on Libvirt TLS IP socket.
>
> When using systemd units in a pacemaker cluster this is fatal:
> pacemaker-controld[7467]:  notice: Transition 316 action 81 
> (prm_libvirtd-tls-sock_start_0 on rksaph19): expected 'ok' but got 'error'
>
> Maybe the special problem is that two socket units (libvirtd-ro.socket, 
> libvirtd-tls.socket) exist to start the same service (libvirtd.service).
>
> I'm clueless how to handle that. Ideas?

The socket activation logic works so that the activation sockets are
passed to the service being activated during execve(). Thus, if a
service is already running we can't pass in more sockets: you have to
restart the service so that there's another execve() we can pass the
newly started sockets over.

My guess is that your service — if it finds that it didn't get a
socket passed in that it needs — just creates the socket itself as a
fallback...

It's generally a good idea for services to have Requires= + After= on
the sockets that actviate it, to make sure that the sockets are always
started before the service itself, and the situation you are seeing
cannot happen.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to