LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-02-2022, 06:16 PM   #1
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Rep: Reputation: 2
Unhappy 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?

Last edited by shanebagel; 08-02-2022 at 06:34 PM.
 
Old 08-03-2022, 01:24 PM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by shanebagel View Post
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")
 
Old 08-03-2022, 01:32 PM   #3
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Original Poster
Rep: Reputation: 2
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?
 
Old 08-03-2022, 01:35 PM   #4
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by shanebagel View Post
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.
 
Old 08-03-2022, 01:42 PM   #5
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Original Poster
Rep: Reputation: 2
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).
 
Old 08-03-2022, 03:14 PM   #6
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Original Poster
Rep: Reputation: 2
Talking

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
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Rootless containers using Podman LXer Syndicated Linux News 0 09-11-2020 09:03 PM
LXer: What happens behind the scenes of a rootless Podman container? LXer Syndicated Linux News 0 02-27-2020 02:00 PM
LXer: Why can't rootless Podman pull my image? LXer Syndicated Linux News 0 09-12-2019 12:40 AM
LXer: How does rootless Podman work? LXer Syndicated Linux News 0 02-11-2019 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration