Using a Proxy Server for RHN Updates on Red Hat Enterprise Linux 6

So, a very long story has resulted in the need for me to employ a proxy server to reach the RHN Classic update infrastructure.  Obviously, the first solution to such a problem would be to switch to the newer Red Hat Subscription Manager (which is far simpler in terms of what you need to allow through your proxy).  That’s the method I’m used to using, and that’s part of the reason that this was such a painful process.  Unfortunately, in my particular situation (for very boring reasons), using RHSM isn’t yet an option.

I began by simply adding the standard directive to /etc/yum.conf.  With RHSM, this has always sufficed for my needs, though after poring over documentation for hours, I ran across a Red Hat Solution (cited below) stating that I should also be adding a configuration directive to /etc/rhsm/rhsm.conf.  It looks like RHSM automatically detects the proxy configuration in /etc/yum.conf, however, and pulls it into /etc/rhsm/rhsm.conf, since I found the proper information is in place when I checked.

Unfortunately, RHN Classic is not similar (at least, not with an outdated RHEL 6.4 system).  With RHN Classic, adding the /etc/yum.conf proxy directive fails to actually cause yum to make use of the designated proxy server.  I spent hours trying to figure this out, I am sad to admit.  After following my proxy server’s logs to see if the system in question ever actually communicated with it and finding that it did not seem to so much as make an attempt to do so, I set up a packet capture on the problematic system and determined that it was completely ignoring my proxy directive and attempting a direct connection with RHN anyway.  This resulted in the predictable failure I was trying to avoid.

The problem is that RHN Classic utilities (such as rhn_check) depend on the old up2date utility.  The up2date utility has its own configuration file in /etc/sysconfig/rhn/up2date.  In there, you’ll find proxy directives to configure, and then your system will behave as expected.

SO, the process for using a proxy server with RHN updates on RHEL 6 is as follows:

  1. Configure your proxy server to allow communication with the necessary URLs
    1. RHN Classic:
    2. Red Hat Subscription Manager:
  2. Configure your client system to use the proxy:
    1. RHN Classic:
      1. Modify /etc/sysconfig/rhn/up2date with the proper proxy directives
      2. Modify /etc/yum.conf with the proper proxy directive
    2. RHSM: (same as above)
      1. Note that modifying /etc/yum.conf with the proper proxy directive seems to suffice, as this information is pulled into /etc/rhsm/rhsm.conf automatically.

I spent a lot of time trying to determine if there were some hidden configuration file taking precedence over the /etc/yum.conf settings, assuming falsely that yum was the failing party, when up2date was failing initially and preventing yum from even attempting to complete the update process.  Hopefully no one else runs into this sort of archaic issue,  and then hopefully they understand the RHN Classic infrastructure better than I, but if not, I further hope that this will truncate the time required to resolve the matter for others.

This entry was posted in Information Technology and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s