Issue #1762
closedUnable to sync repositories while using authenticated HTTP proxy - RPM1004: Error retrieving metadata: Not found
Description
Description of problem:
Getting "RPM1004: Error retrieving metadata: Not found" while trying to sync a repository on a satellite configured to use squid HTTP proxy.
the message seen from satellite is
"RPM1004: Error retrieving metadata: Not found"
while squid/access.log shows:
1457543658.360 0 <ip> TCP_DENIED/407 3605 CONNECT cdn.redhat.com:443 - HIER_NONE/- text/html
the /etc/pulp/server/plugins.conf.d/yum_importer.json:
{
"proxy_host": "http://my.squid_proxy.server",
"proxy_port": 3128,
"proxy_username": "login",
"proxy_password": "pass"
}
- after removing the proxy configuration from yum_importer.json, the sync works fine.
Version-Release number of selected component (if applicable):
- rpm -qa pulp
pulp-rpm-plugins-2.8.0.1-1.beta.el6sat.noarch
python-pulp-puppet-common-2.8.0.1-2.beta.el6sat.noarch
python-pulp-oid_validation-2.8.0.1-0.7.beta.el6sat.noarch
pulp-nodes-parent-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-docker-common-2.0.0.1-1.beta.el6sat.noarch
pulp-selinux-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-bindings-2.8.0.1-0.7.beta.el6sat.noarch
pulp-nodes-common-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-streamer-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-common-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-rpm-common-2.8.0.1-1.beta.el6sat.noarch
pulp-client-1.0-1.noarch
rubygem-smart_proxy_pulp-1.2.0-1.el6sat.noarch
python-pulp-repoauth-2.8.0.1-0.7.beta.el6sat.noarch
pulp-katello-1.0-3.el6sat.noarch
pulp-puppet-plugins-2.8.0.1-2.beta.el6sat.noarch
pulp-puppet-tools-2.8.0.1-2.beta.el6sat.noarch
pulp-docker-plugins-2.0.0.1-1.beta.el6sat.noarch
pulp-server-2.8.0.1-0.7.beta.el6sat.noarch
How reproducible:
- always with authed http proxy
Steps to Reproduce:
1. setup a squid http proxy server with http authentication
2. configure satellite to use the proxy server
3. try to sync some RH or custom repo
Actual results:
RPM1004: Error retrieving metadata: Not found
Expected results:
sync works
Additional info:
I was able to reproduce the err 407 using a simple netcat session:
$ nc my_proxy 3128
CONNECT cdn.redhat.com:443
(complete output: http://pastebin.test.redhat.com/355348)
When i specify the HTTP/1.1 at the end of the first request line, squid proxy waits for me to send the headers (including the auth header):
$ nc my_proxy 3128
CONNECT cdn.redhat.com:443 HTTP/1.1
Proxy-Authorization: Basic HLbtd5HnrVdfHWA7
HTTP/1.1 200 Connection established
Revert changes for digest proxy
Due to interesting circumstances surrounding the way httplib opens proxy connections, our method for guessing proxy authentication appears to not work for certain instances. This patch reverts those changes till we can find a more robust way to handle the situation.
refs: #469 https://pulp.plan.io/issues/469
closes: #1762 https://pulp.plan.io/issues/1762