-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rootless container doesn't start at systemstart: podman[29817]: Error: no container with name or ID <container ID> found: no such container #8504
Comments
In #4678 I don't see the solution and there is no reference to where in the troubleshooting guide the solution is noted. |
I incompletely posted the It seems the first issue I'm getting is: When I list all containers the container is present
Sarting the container without root works (sure, rootless):
Starting the container as root doesn't work - systemd might start this as root... But rootless containers should work to start on system start with systemd (As mentioned in #4678 for example). Why is this container not found?
|
Rootless containers are not supposed to be run as root. You have to start them in your systemd user session. |
Thanks for helping me.
I planned to run a container at boot, therefore I copied the systemd files to Can I start rootless containers at boot without a user logged in? And how do I do that? |
If you run |
You will also need to set User to the user who should be running the
container. Please note, though, that this is something the systemd team
doesn't really support that well, the intention there is to run the units
on the user that will launch the service.
…On Sat, Nov 28, 2020, 09:38 Luap99 ***@***.***> wrote:
If you run loginctl enable-linger <username> and have the unit enabled it
should start at boot.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8504 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCBPQXSKXROSUFXNESLSSEDN7ANCNFSM4UFWWHZA>
.
|
Thanks I'll keep that in mind. Currently I use the user systemd. The errors in
Stopping the service (and the container) works via systemd --user and the stop-process returns. |
Created #8506 for the remaining issue for better tracking. |
Ah, I forgot about that issue. Systemd is complaining about the ownership of the PID file - systemd, when run as root, wants all PID files to also be owned by root (for security reasons). This protection even applies to unit files that use the User directive, which are clearly not running as root (so you'd imagine they'd allow the user that ran the process to be the owner of the PID file?). We talked with the systemd team about this and they felt that their current behavior is correct. |
/kind bug
Description
I'm running a rootles container and use
podman generate systemd --files --name --restart-policy=always -t 1 181f37a4d457
to generate systemd files. They are placed at/etc/system/systemd/
.The service does not start.
podman[29817]: Error: no container with name or ID frosty_jang found: no such container
When I list all containers the container is present
Detailed error log below
Steps to reproduce the issue:
Create a rootless container
Create and copy systemd files to
/etc/system/systemd/
to start the container on systemstartEnable and start the service associated with the container
Describe the results you received:
journalctl output:
Describe the results you expected:
Service starts without issue
Additional information you deem important (e.g. issue happens only occasionally):
I use gid mapping?
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Issue #4678 might be related
Searched troubleshooting without finding something related
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: