On Mo, 06.01.20 20:28, Jeffrey Walton (noloader@xxxxxxxxx) wrote: > I'm trying to determine my service fails to start. I copied the > service to the systemd unit directory, and then enabled and started > the service. Upon reboot the service is not started automatically. > > Here are the logs: > > $ journalctl -e | grep callboot > Jan 06 20:25:33 raspberrypi systemd[1]: graphical.target: Found > dependency on callboot-ui.service/start > Jan 06 20:25:33 raspberrypi systemd[1]: graphical.target: Job > callboot-ui.service/start deleted to break ordering cycle starting > with graphical.target/start The logs actually show you the full ordering cycle you defined. But your "grep" hides that. Drop the "grep", and look for the lines around the above it tells you where you have an ordering cycle. Ordering cycle means your service is ordererd after some other service (or multiple of them) that are ultimately ordered again after your own service, which is hence a cycle. systemd cannot fulfill that and complains. > > $ cat /etc/systemd/system/callboot-monitor.service > [Unit] > Description=Callboot service > > # This service waits for the UI. It slows down the > # boot so the service starts without failure. > After=graphical.target > Wants=graphical.target > # Service waits for the USB modem > After=usb.target > Wants=usb.target > > [Service] > Type=simple > ExecStart=/opt/callboot/bin/callboot.exe > > [Install] > WantedBy=multi-user.target So this is your cycle: your service is declared to start before multi-user.target (since WantedBy= generally implies Before=, unless DefaultDependencies=no is specified), but after graphical.target, but graphical.target itself is ordered after multi-user.target. Hence you declare the following cycle: graphical.target → callboot-monitor.service → multi-user.target → graphical.target Break that up. Lennart -- Lennart Poettering, Berlin _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel