Yum Proxies for RHEL 8

Hi,

I’ve been trying to cretae a yum proxy for RHEL 8 machines in AWS. I have followed the guide linked below to the letter but having no joy.

https://help.sonatype.com/repomanager3/formats/yum-repositories/proxying-rhel-yum-repositories#ProxyingRHELYumRepositories-ProxyingYumRepositoriesonRHEL

When running yum update I get errors such as:

[root@ip-10-202-33-69 ~]# yum update
Nexus Repository Baseos 20 kB/s | 2.1 kB 00:00
Errors during downloading metadata for repository ‘nexus_baseos’:

  • Status code: 502 for h t t p s :// my nexus domain repository/rhel-proxy/8/x86_64/os/repodata/repomd.xml (IP: x.x.x.x)
    Error: Failed to download metadata for repo ‘nexus_baseos’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    [root@ip-10-202-33-69 ~]#

My yum repo looks like this:

[nexus_baseos]
name = Nexus Repository Baseos
enabled=1
gpgcheck = 1
baseurl = h t t p s :// my nexus domain /repository/rhel-proxy/$releasever/$basearch/os
ui_repoid_vars = releasever basearch
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
priority=1

[nexus_appstream]
name = Nexus RHEL x86_64 AppStream Proxy (RPMs)
enabled=1
gpgcheck = 1
baseurl = h t t p s :// my nexus domain /repository/rhel-proxy/$releasever/$basearch/appstream
ui_repoid_vars = releasever basearch
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
priority=1

You should look at the Nexus log.

I’m getting the same response as above, is there anything specific we should be looking for in the nexus logs? I’m just running it for rhel9

So the issue is that client side errors don’t really provide enough information to suggest a diagnosis.

502 may suggest that you’ve misconfigured the repository, it may also suggest that the remote itself is returning an error.

If nothing is visible in the nexus log, your best bet would be to see what URLs appear in your request log for the repository that fail and build the URL which is being used to make requests to the remote and use cURL or similar and see what responses you receive.