Yum update fails with "There was an error communicating with RHN. RHN support will be disabled" error.

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Issue

  • Yum update fails with " There was an error communicating with RHN. RHN support will be disabled "

  • System not communicating with Red Hat Network ( RHN )

  • Yum update fails with following error :

#yum update 
Loading "rhnplugin" plugin 
Loading "security" plugin 
There was an error communicating with RHN. 
RHN support will be disabled. 
Error communicating with server. The message was: 
timed out 
Skipping security plugin, no data 
Setting up Update Process 
Skipping security plugin, no data 
Skipping security plugin, no data 
No Packages marked for Update 
  • Running rhn-profile-sync throws the error shown below :
# rhn-profile-sync -vv 

updateLoginInfo() login info 
D: login(forceUpdate=True) invoked 
logging into up2date server 
A protocol error occurred: Forbidden , attempt #1, 
A protocol error occurred: Forbidden , attempt #2, 
A protocol error occurred: Forbidden , attempt #3, 
A protocol error occurred: Forbidden , attempt #4, 
A protocol error occurred: Forbidden , attempt #5, 
There was a RhnServerException while testing login: 

Error communicating with server. The message was: 
Forbidden
  • Or
[root@vmwmftapp08-dev rhn]# rhn-profile-sync -vv
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
A socket error occurred: (113, 'No route to host'), attempt #1
A socket error occurred: (113, 'No route to host'), attempt #2
A socket error occurred: (114, 'Operation already in progress'), attempt #3
A socket error occurred: (114, 'Operation already in progress'), attempt #4

[1]+  Stopped                 rhn-profile-sync -vv

Resolution

  • Modify the proxy/firewall rules to allow access to rhn.redhat.com
  • Check if Red Hat server name and SSL certificate path is correct in /etc/sysconfig/rhn/up2date
   serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC
   sslCACert=/usr/share/rhn/RHNS-CA-CERT

Root Cause

  • The system is unable to contact RHN (rhn.redhat.com) server.

Diagnostic Steps

  1. System is not registered on RHN or might be possible that system is not checking with RHN from long time.

  2. There is connection problem, because connection got timed out.

  • Check the network connectivity.
# telnet rhn.redhat.com 80 
# telnet rhn.redhat.com 443 
  • Register the system on RHN.
# rhnreg_ks --username rhn-username --password user-password --force

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

4 Comments

Hi I have tried to run the commands above without success. Would it be possible to delete the system from the registered systems and re-add it with the correct IP address and name?

I keep getting the following mesage when I try to do a yum update.

yum update

Loaded plugins: refresh-packagekit, rhnplugin
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:
Proxy Timeout ( The connection timed out. )
Setting up Update Process
No Packages marked for Update

I ran the following command.

rhn-profile-sync -vv

updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login
A protocol error occurred: Proxy Timeout ( The connection timed out. ) , attempt #1,
There was a RhnServerException while testing login:

I verified that my subscription was still good.
It works fine on another one of my servers and no proxy on my end.

Another point of view for this incident: http://www.cyberciti.biz/faq/centos-redhat-fedora-linux-using-yum-with-a-proxy-server/

the page is out of date! It should refer the user to RHSM