LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't run rootless container using podman? (https://www.linuxquestions.org/questions/linux-newbie-8/cant-run-rootless-container-using-podman-4175715301/)

shanebagel 08-02-2022 06:16 PM

Can't run rootless container using podman?
 
Sorry to constantly be posting to this forum, but I can't find any answers online - at least nothing is relevant to this particular case:



When trying to run:

podman run --name my-container ubi8
WITHOUT sudo


I receive this error:

"Error: OCI runtime error: crun: sd-bus call: Transport endpoint is not connected"

Has anyone seen this before? I'm running rhel 9.0 and podman 4.0.2
I'm studying for the RHCSA and need to be able to run rootless containers for the exam







This ONLY happens when running as ROOTLESS, meaning running it as a user who is not root, without sudo, and the user is apart of the wheel group.
Should I be running this command with sudo? I thought rootless meant you weren't supposed to run the command with sudo?

dc.901 08-03-2022 01:24 PM

Quote:

Originally Posted by shanebagel (Post 6371462)
Sorry to constantly be posting to this forum, but I can't find any answers online - at least nothing is relevant to this particular case:



When trying to run:

podman run --name my-container ubi8
WITHOUT sudo


I receive this error:

"Error: OCI runtime error: crun: sd-bus call: Transport endpoint is not connected"

Has anyone seen this before? I'm running rhel 9.0 and podman 4.0.2
I'm studying for the RHCSA and need to be able to run rootless containers for the exam







This ONLY happens when running as ROOTLESS, meaning running it as a user who is not root, without sudo, and the user is apart of the wheel group.
Should I be running this command with sudo? I thought rootless meant you weren't supposed to run the command with sudo?

For podman command, have you tried to set "log-level to debug" to see if there is anything more helpful?

Code:

--log-level string            Log messages above specified level (trace, debug, info, warn, warning, error, fatal, panic) (default "warn")

shanebagel 08-03-2022 01:32 PM

Thanks for the input.
I'm not sure how to run that, do I just append that "--log-level debug" to the end of the command?

dc.901 08-03-2022 01:35 PM

Quote:

Originally Posted by shanebagel (Post 6371638)
Thanks for the input.
I'm not sure how to run that, do I just append that "--log-level debug" to the end of the command?

Yes, that is what I understood.

shanebagel 08-03-2022 01:42 PM

So I'm getting:
"Error:OCI runtime error: crun: sd-bus call: Transport endpoint is not connected: transport endpoint is not connected"

This is what I get when I run the --log-level debug flag after the command.
Any ideas how to solve this or where I can look? I've tried this on multiple VMs running various distros (Fedora/CentOS/RHEL).

shanebagel 08-03-2022 03:14 PM

WOAHH I totally figured out what I was doing wrong:



Found this answer: "You cannot use su as this does not create a proper user session. It also leaks the XDG_RUNTIME_DIR env var from the root user (/run/user/0).
Try to change the user with su --login or sudo -i -u user."

I'm getting tons of errors because I was using su to switch users accounts, which was causing issues with the environment variables that podman needs to run, so now I should be able to run all podman commands without sudo or as root!!!!!

Thanks for the input


All times are GMT -5. The time now is 11:09 PM.