Bug 848190

Summary: Error while checking server version: (111, 'Connection refused')
Product: Red Hat Enterprise Linux 5 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.9CC: bgollahe, bkearney, skallesh
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 03:58:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 771748    

Description John Sefler 2012-08-14 20:59:51 UTC
Description of problem:
Several variations of our automated subscription-manager proxy tests are failing with this error. Below is one variation...

Version-Release number of selected component (if applicable):
[root@jsefler-rhel59 ~]# subscription-manager version
remote entitlement server: 0.7.6-1
remote entitlement server type: subscription management service
subscription-manager: 1.0.13-1.git.18.ceba598.el5
python-rhsm: 1.0.5-1.git.1.1ce0910.el5

How reproducible:


Steps to Reproduce:
[root@jsefler-rhel59 ~]# subscription-manager identity --proxy=auto-services.usersys.redhat.com:31280000000
Error while checking server version: (111, 'Connection refused')
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

  
Actual results:
Error while checking server version: (111, 'Connection refused')
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

Expected results:
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.


Additional info:
[root@jsefler-rhel59 ~]# tail -f /var/log/rhsm/rhsm.log
2012-08-14 16:51:35,984 [DEBUG]  @profile.py:95 - Loading current RPM profile.
2012-08-14 16:51:36,191 [DEBUG]  @managercli.py:250 - Client Versions: {'subscription manager': '1.0.13-1.git.18.ceba598.el5', 'python-rhsm': '1.0.5-1.git.1.1ce0910.el5'} 
2012-08-14 16:51:36,192 [INFO]  @connection.py:498 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2012-08-14 16:51:36,192 [INFO]  @connection.py:511 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2012-08-14 16:51:36,194 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-08-14 16:51:36,194 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-08-14 16:51:36,194 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-08-14 16:51:36,195 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-08-14 16:51:36,195 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280000000
2012-08-14 16:51:36,195 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/
2012-08-14 16:51:36,268 [ERROR]  @utils.py:316 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/utils.py", line 305, in get_server_versions
    if cp.supports_resource("status"):
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 538, in supports_resource
    self._load_supported_resources()
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 525, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 400, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 350, 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/site-packages/rhsm/connection.py", line 139, in endheaders
    httpslib.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 175, in connect
    HTTPConnection.connect(self)
  File "/usr/lib64/python2.4/httplib.py", line 636, in connect
    raise socket.error, msg
error: (111, 'Connection refused')
2012-08-14 16:51:36,369 [DEBUG]  @managercli.py:263 - Server Versions: {'candlepin': 'Unknown', 'server-type': 'Unknown'} 
2012-08-14 16:51:36,375 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-08-14 16:51:36,375 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-08-14 16:51:36,376 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-08-14 16:51:36,376 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-08-14 16:51:36,376 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280000000
2012-08-14 16:51:36,377 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/8f670811-2c7e-489d-9a8a-eafa077d81ab/owner
2012-08-14 16:51:36,382 [ERROR]  @managercli.py:114 - Error: Unable to generate a new identity for the system
2012-08-14 16:51:36,382 [ERROR]  @managercli.py:115 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 577, in _do_command
    owner = self.cp.getOwner(consumerid)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 653, in getOwner
    return self.conn.request_get(method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 400, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 350, 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/site-packages/rhsm/connection.py", line 139, in endheaders
    httpslib.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 175, in connect
    HTTPConnection.connect(self)
  File "/usr/lib64/python2.4/httplib.py", line 636, in connect
    raise socket.error, msg
error: (111, 'Connection refused')

Comment 2 Bryan Kearney 2012-08-16 20:25:32 UTC
fixed in master at 6266cfc553941ad3668d4bdd26e94362e7536740.

Comment 3 Shwetha Kallesh 2012-08-17 11:34:46 UTC
Marking verified!!
[root@dhcp201-115 ~]# rpm -qa | grep subscription-manager
subscription-manager-firstboot-1.0.13-1.git.45.5cb55c8.el5
subscription-manager-1.0.13-1.git.45.5cb55c8.el5
subscription-manager-migration-data-1.11.2.3-1.git.0.861f9ba.el5
subscription-manager-gui-1.0.13-1.git.45.5cb55c8.el5
subscription-manager-migration-1.0.13-1.git.45.5cb55c8.el5


[root@dhcp201-115 ~]# subscription-manager identity --proxy=auto-services.usersys.redhat.com:31280000000
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

Comment 5 errata-xmlrpc 2013-01-08 03:58:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0033.html