-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Bug] - Yum not respecting proxy_username/proxy_password in dnf.conf #918
Comments
@pandel this looks like a Docker issue. Try adding the proxy as an argument to the |
@zcobol Please not this kind of "the OP's not knowing what he's doing" assumption-based kind of hints! I do know about build args and ENV vars, Docker daemon overrides regarding proxy settings or modifications to the daemon init files regarding proxy settings for its environment, blablablabla... this is not what this here is about! I build Docker images for a lot of years now behind authentication proxies! No Debian, Ubuntu, Alpine or whatever not Yum-based Linux is making any problems here. This is the first time I sadly have to use (Amazonlinux) a Yum-based distro and this happens ootb and a long Google search this afternoon revealed that Yum has had enough proxy problems throughout the past. Additionally, there are some simple curl commands inside the Dockerfile I am referring to that do work nicely with the proxy as long as Yum does not come into play! So, it is definitely a Yum problem, which might have to do with it being executed inside of a Docker environment, but then it is still a Yum problem. |
Interesting.... So, AL2023 uses If possible to do so, can you check to see if the same problem is present in current Fedora? |
Yes it is. Here is what I did... How to provide proxy server information
Docker base images used
Example Dockerfile used
Test results
Conclude But it seems, the error is different between the Fedora releases:
|
@pandel according to
You mention that |
@elsaco I already did before, but this led to |
There's a quick test you can do and find out if |
@zcobol You did not read a single bit of my long test result post, right? I did as you suggested and more already... |
@pandel Sorry you didn't like my suggestion. IMO, it's easier to troubleshoot with a running container then watching it fail at container buildup. If you have access to the proxy inspect the messages there also. A |
Thanks for testing it on Fedora! For background on versioning, our Although with different build options, currently: CentOS 9 Stream is on 1.14.5 as is AL2023, upstream is at 1.19.0 (as is all current Fedora versions). One change that caught my eye quickly looking through the interim If we look at Fedora 37's So... that could explain the F37 and AL2023 issue (assuming there's URL encoding fun going on, you do not have to mention anything about a real password of course), but it doesn't explain the F41 behavior unless your container image is really old. Next idea... Amazon Linux 2023 by default ships with a minimal build of |
For what is worth AL2023 dnf does work over a proxy. Sample access log:
|
@zcobol @stewartsmith I made some progress today investigating the whole thing: As I wasn't able to build the image based on
-> So, it is irrelevant if the commands are being run during build phase or in a running container (@zcobol) @stewartsmith @zcobol Here comes the main progress of today: So, it must have something to do with how authentication against this proxy seems to be handled by the distro and yes, NTLM to basic auth fallback might be the main reason here. |
@pandel Is a complex password with various different characters? Sometimes, with some software, I have to escape password characters. That version of |
Sorry for the late answer... No, it has nothing to do with the password. If you would have read what I already wrote, then you would have read that it is working under normal conditions, with other containers on other OSs, but simply not with |
I'm mostly wondering how dnf is handling the given password. |
Describe the bug
It is not possible to build a Docker image based on
amazonlinux:2023
behind an authentication proxy. Yum (curl) always returns a HTTP 407 error, regardless of its configuration.The proxy address itself is reachable inside the container (tested) and also seems to be read by
yum
, because I can provoke a connection error message when I misconfigure the proxy URL, but the authentication mechanism doesn't seem to work. Sadly, I cannot avoid the proxy authentication in any case.To Reproduce
To reproduce the error you need to connect to the Internet via an authentication proxy and add the following to the
Dockerfile
before the firstyum install
command is being used:Expected behavior
According to this AWS re:Post documentation
yum install
should connect to the Internet using the proxy now.Reported error
In my case, I do have to use this proxy inside my Dockerfile, as I don't have any possibility to directly connect to the Internet.
What can be done?
Regards,
Holger
The text was updated successfully, but these errors were encountered: