User Tools

Site Tools


doc:appunti:linux:sa:systemd_tmpfiles_problem

This is an old revision of the document!


Problem with systemd-tmpfiles-setup service

In a Debian 12 Bookworm installation I faced several problems at bootstrap. Some services does not start basically because the /run hierarchy was not properly initialized with the required subdirectories. E.g. one OpenVPN service does not start beacuse the /run/openvpn/ directory does not exists:

ovpn-office[2853]: Options error: --writepid fails with '/run/openvpn/office.pid':
    No such file or directory (errno=2)

An enlightening error message is displayed by dmesg:

systemd[1]: sysinit.target: Found ordering cycle on systemd-tmpfiles-setup.service/start
systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break
            ordering cycle starting with sysinit.target/start

I.e. the service sysinit.target cannot start due a service ordering problem, so it decided to delete the systemd-tmpfiles-setup.service. The problem could be with other Systemd unit too, e.g. the avahi-daemon.socket:

systemd[1]: avahi-daemon.socket: Found dependency on systemd-tmpfiles-setup.service/start
systemd[1]: avahi-daemon.socket: Job systemd-tmpfiles-setup.service/start deleted to break
            ordering cycle starting with avahi-daemon.socket/start

Others problematic Systemd units can be: sockets.target, basic.target.

Analyzing Systemd

systemd-analyze verify default.target

May be the problem was introduced by this Postfix/Courier setup: Creating the Courier socket into the Postfix chroot.

doc/appunti/linux/sa/systemd_tmpfiles_problem.1708602417.txt.gz · Last modified: 2024/02/22 12:46 by niccolo