Open jeffmaury opened 10 months ago
A friendly reminder that this issue had no activity for 30 days.
Hello
I had similar issue (using podman on windows) just after doing
podman machine stop
podman machine set --user-mode-networking=false
podman machine start
For my case , root cause was "an invalid config" pushed into /etc/resolv.conf (inside the podman WSL distribution). It was displaying a single line (nameserver x.x.x.x) pointing to the WSL interface IP (which is wrong)
I'm not sure what from above steps causes a wrong edition of /etc/resolv.conf .. but for sure it breaks all the DNS resolution, making network no more usable.
Note1: Just re-editing the /etc/resolv.conf worked for me
#From windows host
wsl --list --verbose
wsl --distribution <<The podman machine you are using>>
#From the WSL linux (where we just jumped into)
sudo vi etc/resolv.conf
#Then add a valid nameserver IP (get it from your windows one)
Note2: Normally the /etc/wsl.conf can be edited to explicit "generateResolvConf = false" Such should avoid re-configuration of the /etc/resolv.conf. When missing, it could worth that podman ensure the nameserver written in /etc/resolv.conf is at least a valid one (in our case "main computer default DNS server" would be a far better choice than the WSL interface IP)
If, like me, you run podman from windows , the actual default DNS server can be found using following powershell comand
Get-DnsClientServerAddress -AddressFamily IPv4 | Select-Object -ExpandProperty ServerAddresses
@jsearby Thank you so much for this answer! I had to reinstall Podman into v4.9.0 and I had the exact same experience. I'm behind a corporate network, so it's important the DNS stays the same. Not sure what changed since last, but I'm quite sure this will break for many other users as well.
Your fix worked for me, little cumbersome you have to edit it through vi
but it is what it is.
Can you retest with podman 5.0?
See #24061 for a reproducer on Podman 5.2.2
It's still an issue for me as well, and it breaks every time I have to re-create the VM
Issue Description
I created a podman image, set user-mode-networking and started it. Pulling an image is ok. Then stop it; reset the user-mode-networking, restart it: pull images is rejected
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
$ podman pull alpine Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf) Trying to pull docker.io/library/alpine:latest... Error: initializing source docker://alpine:latest: pinging container registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io: Temporary failure in name resolution
Describe the results you expected
alpine image should be pulled
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting