-
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
failed to pull image when use system proxy #14087
Comments
@y0zong: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks for reaching out, @y0zong!
Where do you set the proxy? Do you set it inside the |
no, on host (mac os in my case), maybe it's no need to set proxy inside the |
The proxy is set correctly: The problem is that your proxy is listening on 127.0.0.1. Obviously 127.0.0.1 inside the VM is a different address and therefore it cannot connect to the proxy on you actual host. If you set |
thank for point out this @Luap99 , and the problem is should I add I think it's better that podman automatically map host proxy value to machine so it can read it correctly |
if you run |
I just test it and I think you are right, but I don't know why however it works now add item blow to host file 127.0.0.1 host.containers.internal and change proxy to http_proxy=socks5://host.containers.internal:7890 then everything works fine much thanks @Luap99 for your help and I close this issues for the problem is solved, but I still stay concerned if some day podman can do this itself and no need to change proxy setting |
I figured out this issue, it seems podman copy all current shell's env into the machine when I do
I don't have $http_proxy var setting on my host zsh terminal but still got this issue.
After I ssh into the machine:
How is this happen, why the machine have |
faced with the same issue, and figured out that it was set in
|
When the `machine start` command is executed, Podman automatically retrieves the current host's `*_PROXY` environment variable and assigns it directly to the virtual machine in QEMU. However, most `*_PROXY` variables are set with `127.0.0.1` or `localhost`, such as `127.0.0.1:8888`. This causes failures in network-related operations within the virtual machine due to incorrect proxy settings. Fixes: containers#14087 Signed-off-by: Black-Hole1 <[email protected]>
Description
In China we have to use proxy to access docker hub to pull image
proxy setting (this works fine in docker)
http_proxy=socks5://127.0.0.1:7890
access test, success to resolve docker.io
or (success when use podman login)
but connection refused when pull image
keypoint in error
pinging container registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused
I don't know if podman use ping result to decide connection status, otherwise ping can be failed but connection is still alive when use socks5 proxy (that's why I use curl -vv test instead ping)
pls help
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug (maybe)
Steps to reproduce the issue:
set system proxy (http_proxy)
podman-compose start project
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
mac os Monterey
The text was updated successfully, but these errors were encountered: