I created container of heimdall, for auto-start at boot in podman I created a service using “podman generate systemd” command .
When I tried to start the service using “sytemctl start heimdall.service”, I am getting this error "Job for heimdall.service failed because the control process exited with error code. See “systemctl status heimdall.service” and “journalctl -xeu heimdall.service” for details."
Aug 10 11:50:42 nemo systemd[1]: heimdall.service: Scheduled restart job, restart counter is at 6.
Aug 10 11:50:42 nemo systemd[1]: Stopped heimdall.service - Podman container-heimdall.service.
Aug 10 11:50:42 nemo systemd[1]: heimdall.service: Start request repeated too quickly.
Aug 10 11:50:42 nemo systemd[1]: heimdall.service: Failed with result 'exit-code'.
Aug 10 11:50:42 nemo systemd[1]: Failed to start heimdall.service - Podman container-heimdall.service.
Aug 10 11:50:42 nemo systemd[1]: heimdall.service: Scheduled restart job, restart counter is at 6.
â–‘â–‘ Subject: Automatic restarting of a unit has been scheduled
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ Automatic restarting of the unit heimdall.service has been scheduled, as the result for
â–‘â–‘ the configured Restart= setting for the unit.
Aug 10 11:50:42 nemo systemd[1]: Stopped heimdall.service - Podman container-heimdall.service.
â–‘â–‘ Subject: A stop job for unit heimdall.service has finished
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ A stop job for unit heimdall.service has finished.
â–‘â–‘
â–‘â–‘ The job identifier is 2120 and the job result is done.
Aug 10 11:50:42 nemo systemd[1]: heimdall.service: Start request repeated too quickly.
Aug 10 11:50:42 nemo systemd[1]: heimdall.service: Failed with result 'exit-code'.
â–‘â–‘ Subject: Unit failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ The unit heimdall.service has entered the 'failed' state with result 'exit-code'.
Aug 10 11:50:42 nemo systemd[1]: Failed to start heimdall.service - Podman container-heimdall.service.
â–‘â–‘ Subject: A start job for unit heimdall.service has failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ A start job for unit heimdall.service has finished with a failure.
â–‘â–‘
â–‘â–‘ The job identifier is 2120 and the job result is failed.
Previously, I was logged as user and placed systemd units in this location under /etc/systemd/systemctl, I’ve modified the location to ~/.config/systemd/user and used the following commands to enable and start the service.
I’ve had problems with this as systemd wouldn’t start the container until that user had logged in after reboot and the process was getting killed after a while of idle time. One workaround is to make it a system systemd service but set the User= to the user who owns the container runtime so it’s not dependent on the login.