Registering system with rhnreg_ks gives traceback with "Network error"

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6.4
  • Red Hat Satellite

Issue

  • Getting the following traceback/error when trying to register using rhnreg_ks command:
rhnreg_ks --username tlank --password <password> --force

[Mon Aug 18 07:02:20 2014] rhn_register
Traceback (most recent call last):
  File "/usr/sbin/rhn_register", line 76, in <module>
    app.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 84, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn_register", line 58, in main
    ui.main()
  File "/usr/share/rhn/up2date_client/tui.py", line 1278, in main
    tui.run()
  File "/usr/share/rhn/up2date_client/tui.py", line 1236, in run
    result = win.run()
  File "/usr/share/rhn/up2date_client/tui.py", line 235, in run
    tui_call_wrapper(self.screen, rhnreg.getCaps)
  File "/usr/share/rhn/up2date_client/tui.py", line 81, in tui_call_wrapper
    results = func(*params)
  File "/usr/share/rhn/up2date_client/rhnreg.py", line 249, in getCaps
    s.capabilities.validate()
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 161, in __get_capabilities
    self.registration.welcome_message()
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 51, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 206, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 39, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 386, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 171, in request
    headers, fd = req.send_http(host, handler)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 721, in send_http
    self._connection.connect()
  File "/usr/lib/python2.6/site-packages/rhn/connections.py", line 228, in connect
    self.sock.init_ssl()
  File "/usr/lib/python2.6/site-packages/rhn/SSL.py", line 76, in init_ssl
    self._ctx.load_verify_locations(f)
<class 'up2date_client.up2dateErrors.NetworkError'>: Network error:

Resolution

  • Remove the old installed rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm package, if present.
# rpm - e rhn-org-trusted-ssl-cert
  • Download the new rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm package.
# wget <Satellite_FQDN>/pub/rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm --no-check-certificate.
  • Install the new package and then register.
# rpm -ivh rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm

Root Cause

  • System did not have the correct SSL certificate.
  • SSL certificate was corrupted.

Diagnostic Steps

  • Check that system is able to connect to Satellite server.
# telnet satellite.example.com 80
# telnet satellite.example.com 443
  • Confirm if there is a Proxy in between.

  • Register the system without SSL, for this edit the below line in file /etc/sysconfig/rhn/up2date.

serverURL=https://satellite.example.com/XMLRPC

to 

serverURL=http://satellite.example.com/XMLRPC

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.

Comments