rhn-migrate-classic-to-rhsm not working with HTTP proxy

Solution Verified - Updated -

Issue

  • Encountering any one of the following errors when running rhn-migrate-classic-to-rhsm:
Traceback (most recent call last):
  File "/tmp/rhn-migrate-classic-to-rhsm", line 424, in ?
    main()
  File "/tmp/rhn-migrate-classic-to-rhsm", line 396, in main
    checkOkToProceed(username, password)
  File "/tmp/rhn-migrate-classic-to-rhsm", line 131, in checkOkToProceed
    cp.getOwnerList(username)
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 516, in getOwnerList
    return self.conn.request_get(method)
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 267, in request_get
    return self._request("GET", method)
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 227, in _request
    conn.request(request_type, handler, body=body, headers=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/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 47, in connect
    self.sock.connect((self.host, self.port))
  File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 170, in connect
    self.socket.connect(addr)
  File "<string>", line 1, in connect
socket.error: (110, 'Connection timed out')
... or ...
socket.gaierror: (-2, 'Name or service not known')

... or ...

2012-02-28 10:36:53,447 [INFO]  @rhn-migrate-classic-to-rhsm:161 - Deleting
system 1022063576 from RHN Classic...
2012-02-28 10:40:02,461 [ERROR]  @rhn-migrate-classic-to-rhsm:176 - Traceback
(most recent call last):
  File "/tmp/rhn-migrate-classic-to-rhsm", line 166, in
unRegisterSystemFromRhnClassic
    sk = sc.auth.login(username, password)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
    self.send_content(h, request_body)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
    connection.endheaders()
  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/httplib.py", line 1078, in connect
    sock.connect((self.host, self.port))
  File "<string>", line 1, in connect
error: (110, 'Connection timed out')

... or ...

Preparing to unregister system from RHN classic ...
System successfully unregistered from RHN Classic.
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 421, in ?
    main()
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 412, in main
    transferHttpProxySettings()
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 223, in
transferHttpProxySettings
    proxy_hostname, proxy_port = rhncfg['httpProxy'].split(':')
ValueError: too many values to unpack
  • Error running rhn-migrate-classic-to-rhsm

Environment

  • Red Hat Enterprise Linux 5.8
  • subscription-manager-migration-0.98.16-1.el5_8
  • RHN and CDN (Content Delivery Network) access via HTTP proxy

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In