-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 containers in the same pod can't communicate with each other #25372
Comments
Small disclaimer, I am fairly new to podman and somewhat newish to container workloads overall. It is entirely possible I messed up my configuration somewhere. |
|
The default behavior of podman compose is to create an empty pod (no pause container) and put the containers into it. The pod's name is, by default The reproducer provided is sufficient in showing this behavior if ran then checking |
A pod alone does not mean the netns is shared, if the pod is created without infra container or without shared netns (see --share) then each container ends up in their own netns. Also if a container is run with --network then that overwrites the pods netns and a new netns is created as well. And as I said podman-compose is a different project so a podman-compose command is not a reproducer to me. |
@haithcockce here is a good demonstration of what you are trying to do I think. I used a podman version from the main branch.
Above we create a pod called
Above we run a container that has curl in it and resolves perfectly. By default, pods created in podman do share a ns. Paul is basically saying we have no idea about podman-compose did it and he's hoping you try a reproducer outside the context of podman-compose so we have a podman-only reproducer. |
Thank you for that clarification; my apologies, like I noted I'm a bit newer to podman and wasn't aware it was a separate project given they were under the same containers group in github. Indeed I can not reproduce it outside of podman compose, so I will open a ticket with that project. Thank you all! |
Issue Description
Describe your issue
In my rootless compose setup, having two running podman containers in the same pod can not access each other via
localhost
,0.0.0.0
, or127.0.0.1
but they can access each other via the respective IP addresses of the containers or the container names. Connection attempts fail withconnection refused
(found when working on connecting python to mongodb) orCould not connect to server
(via the reproducer provided). I can not reproduce when running manually (podman run blahblahblah
).Steps to reproduce the issue
Steps to reproduce the issue
podman compose up
Describe the results you received
Describe the results you received
Describe the results you expected
Describe the results you expected
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
Additional environment details
It appears the two containers run in two different network namespaces.
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: