Why does yum/dnf and reposync fails with error "Received HTTP code 407 from proxy after CONNECT" ?

Solution Verified - Updated -

Issue

  • The reposync fails on the system behind proxy and following error occurs.

    # reposync -p <download-path> --download-metadata --repo=<repo id>
    .
    .
    [FAILED] insights-client-3.1.7-7.el8_6.noarch.rpm: No more mirrors to try - All mirrors were already tried without success
    [MIRROR] perl-Text-Diff-1.44-3.module+el8+2464+d274aed1.noarch.rpm: Curl error (56): Failure when receiving data from the peer for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/perl-Text-Diff-1.44-3.module%2bel8%2b2464%2bd274aed1.noarch.rpm [Received HTTP code 407 from proxy after CONNECT]
    [MIRROR] bpg-sans-regular-fonts-1.005-10.el8.noarch.rpm: Curl error (56): Failure when receiving data from the peer for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/b/bpg-sans-regular-fonts-1.005-10.el8.noarch.rpm [Received HTTP code 407 from proxy after CONNECT]
    [FAILED] bpg-sans-regular-fonts-1.005-10.el8.noarch.rpm: No more mirrors to try - All mirrors were already tried without success
    [FAILED] perl-Text-Diff-1.44-3.module+el8+2464+d274aed1.noarch.rpm: No more mirrors to try - All mirrors were already tried without success
    
  • The yum/dnf fails on the system behind proxy and following error occurs.

     # yum list updates
    Updating Subscription Management repositories.
    Red Hat Satellite Maintenance 6.12 for RHEL 8 x86_64 (RPMs)                                                                                         0.0  B/s |   0  B     00:00
    Errors during downloading metadata for repository 'satellite-maintenance-6.12-for-rhel-8-x86_64-rpms':
      - Curl error (56): Failure when receiving data from the peer for https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/sat-maintenance/6.12/os/repodata/repomd.xml [Received HTTP code 407 from proxy after CONNECT]
    Error: Failed to download metadata for repo 'satellite-maintenance-6.12-for-rhel-8-x86_64-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    

Environment

  • Red Hat Enterprise Linux 10
  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content