Yum update on a Content Host registered to Red Hat Satellite fails with `TypeError: int argument required`.
Environment
- Red Hat Satellite 6.x
- RHEL 5.11
Issue
-
Updating an RHEL 5.11 machine registered to Red Hat Satellite fails with the following traceback:
File "/usr/bin/yum", line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 309, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 261, in main return_code = base.doTransaction() File "/usr/share/yum-cli/cli.py", line 398, in doTransaction problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb) File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1369, in downloadPkgs cache=po.repo.http_caching != 'none', File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 838, in getPackage cache=cache File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 811, in _getFile http_headers=headers, File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 412, in urlgrab return self._mirror_try(func, url, kw) File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 398, in _mirror_try return func_ref( *(fullurl,), **kwargs ) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 936, in urlgrab return self._retry(opts, retryfunc, url, filename) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 854, in _retry r = apply(func, (opts,) + args, {}) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 922, in retryfunc fo = URLGrabberFileObject(url, filename, opts) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1010, in __init__ self._do_open() File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1093, in _do_open fo, hdr = self._make_request(req, opener) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1202, in _make_request fo = opener.open(req) File "/usr/lib64/python2.4/urllib2.py", line 364, in open response = meth(req, response) File "/usr/lib64/python2.4/urllib2.py", line 471, in http_response response = self.parent.error( File "/usr/lib64/python2.4/urllib2.py", line 396, in error result = self._call_chain(*args) File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302 return self.parent.open(new) File "/usr/lib64/python2.4/urllib2.py", line 358, in open response = self._open(req, data) File "/usr/lib64/python2.4/urllib2.py", line 376, in _open '_open', req) File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib64/python2.4/site-packages/M2Crypto/m2urllib2.py", line 82, in https_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/usr/lib64/python2.4/httplib.py", line 810, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request self.endheaders() File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 172, in endheaders HTTPSConnection.endheaders(self) File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders self._send_output() File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output self.send(msg) File "/usr/lib64/python2.4/httplib.py", line 652, in send self.connect() File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 178, in connect self.sock.sendall(self._get_connect_msg()) File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 192, in _get_connect_msg msg = "CONNECT %s:%d HTTP/1.1\r\n" % (self._real_host, self._real_port) TypeError: int argument required
Resolution
- Disable proxy on Content Host at /etc/rhsm/rhsm.conf.
Root Cause
-
There is a proxy between the Content Host and Red Hat Satellite:
[root@content_hosts]# cat /etc/rhsm/rhsm.conf|grep -i proxy # an http proxy server to use proxy_hostname =proxy.redhat.com <<====== # port for http proxy server proxy_port =8080 <<====== # user name for authenticating to an http proxy, if needed proxy_user = # password for basic http proxy auth, if needed proxy_password =
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