Satellite sync attempts errors out with ' server.dump.packages .... Unable to connect to the host and port specified'.

Solution Verified - Updated -

Environment

  • Red Hat Satellite

Issue

Running 'satellite-sync' ends in a traceback as mentioned below:

     root@Testsat ~]# satellite-sync -c rhn-tools-rhel-x86_64-server-6
     :
     :
     10:43:57 Downloading rpm packages
     10:43:57 Fetching any missing RPMs: rhn-tools-rhel-x86_64-server-6 (56)
     10:43:58 Total size: 9.28 MiB
     Exception in thread Thread-1:
     Traceback (most recent call last):
     File "/usr/lib64/python2.6/threading.py", line 532, in bootstrap_inner
     self.run()
     File "/usr/share/rhn/satellite_tools/satsync.py", line 2131, in run
     package_id, nvrea, self.sources)
     File "/usr/share/rhn/satellite_tools/satsync.py", line 2072, in _get_package_stream
     stream = rpmServer.getPackageStream(channel, nvrea)
     File "/usr/share/rhn/satellite_tools/xmlWireSource.py", line 480, in getPackageStream
     return self._rpc_call("getPackage", (channel, package_name))
     File "/usr/share/rhn/satellite_tools/xmlWireSource.py", line 447, in _rpc_call
     ret = apply(getattr(get_server_obj, function_name), params)
     File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 678, in __call
     result = self._send(self._name, args)
     File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 383, 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 702, in send_http
     self._connection.connect()
     File "/usr/lib/python2.6/site-packages/rhn/connections.py", line 219, in connect
     raise socket.error("Unable to connect to the host and port specified")
     error: Unable to connect to the host and port specified

Resolution

  • If Red Hat Satellite server is behind HTTP proxy then confirm whether /etc/rhn/rhn.conf has proper entries for the same.
  • Confirm network connectivity to internet from RHN Satellite server.

  • Ensure satellite can pull updates from RHN as well as sync channels please open the access to the list of FQDN's mentioned below. For these FQDN's you need to open 80 & 443 ports (incoming and outgoing) are :

xmlrpc.rhn.redhat.com
satellite.rhn.redhat.com
content-xmlrpc.rhn.redhat.com
content-web.rhn.redhat.com
content-satellite.rhn.redhat.com
  • If it is not possible to open access to content-* fqdn mentioned above then disable Location aware update's for satellite server. Refer this article - How to disable location aware update

Diagnostic Steps

To check network connectivity :
ping satellite.rhn.redhat.com
telnet satellite.rhn.redhat.com 80
telnet satellite.rhn.redhat.com 443

To test that this is not a simple cache issue, let's have them do the following:

  • rm -rf /var/cache/rhn/satsync/*
  • satellite-sync

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