RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 869046 - (-2, 'Name or service not known') / (111, 'Connection refused') was encountered while performing negative proxy tests
Summary: (-2, 'Name or service not known') / (111, 'Connection refused') was encounter...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 6.5
Assignee: Adrian Likins
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel65 rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2012-10-22 21:05 UTC by John Sefler
Modified: 2013-11-21 21:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Exception exposed to user. Consequence: User sees unfriendly error messages when connecting to a bad proxy. Fix: Capture the error and display a nicer message to the user. Result:
Clone Of:
Environment:
Last Closed: 2013-11-21 21:22:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1659 0 normal SHIPPED_LIVE subscription-manager and python-rhsm bug fix and enhancement update 2013-11-20 21:53:10 UTC

Description John Sefler 2012-10-22 21:05:44 UTC
Description of problem:
As a follow-up from bug 838264 while performing some negative proxy tests, the user gets uninformative stdout messages prior to a more useful "Network error, unable to connect to server." message.

Version-Release number of selected component (if applicable):
[root@jsefler-rhel59 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.0.23-1.el5
python-rhsm-1.0.10-1.el5


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel59 ~]# subscription-manager subscribe --pool=8a90f8763a8926d3013a8928f09b044b --proxy=bad-proxy
(-2, 'Name or service not known')
(-2, 'Name or service not known')
(-2, 'Name or service not known')
(-2, 'Name or service not known')
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

  
Actual results:
above

Expected results:
something more informative than "(-2, 'Name or service not known')"



Additional info:
[root@jsefler-rhel59 ~]# tail -f /var/log/rhsm/rhsm.log

2012-10-22 17:01:56,202 [DEBUG]  @profile.py:95 - Loading current RPM profile.
2012-10-22 17:01:56,450 [INFO]  @managercli.py:252 - Client Versions: {'python-rhsm': '1.0.10-1.el5', 'subscription-manager': '1.0.23-1.el5'} 
2012-10-22 17:01:56,451 [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-10-22 17:01:56,452 [INFO]  @connection.py:511 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2012-10-22 17:01:56,452 [INFO]  @connection.py:508 - Using no auth
2012-10-22 17:01:56,453 [INFO]  @connection.py:511 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2012-10-22 17:01:56,454 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:01:56,454 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:01:56,454 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:01:56,455 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:01:56,455 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:01:56,456 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-10-22 17:01:56,456 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/
2012-10-22 17:01:56,469 [ERROR]  @utils.py:324 - Error while checking server version: (-2, 'Name or service not known')
2012-10-22 17:01:56,469 [ERROR]  @utils.py:326 - (-2, 'Name or service not known')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/utils.py", line 314, 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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')
2012-10-22 17:01:56,565 [INFO]  @managercli.py:263 - Server Versions: {'candlepin': 'Unknown', 'server-type': 'subscription management service'} 
2012-10-22 17:01:56,740 [DEBUG]  @cert_sorter.py:106 - Sorting product and entitlement cert status for: 2012-10-22 21:01:56.740573+00:00
2012-10-22 17:01:56,776 [DEBUG]  @cert_sorter.py:160 - Installed product IDs: ['100000000000006', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000060', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:01:56,776 [DEBUG]  @cert_sorter.py:113 - valid entitled products: []
2012-10-22 17:01:56,776 [DEBUG]  @cert_sorter.py:114 - expired entitled products: []
2012-10-22 17:01:56,776 [DEBUG]  @cert_sorter.py:115 - partially entitled products: []
2012-10-22 17:01:56,777 [DEBUG]  @cert_sorter.py:116 - unentitled products: ['100000000000060', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:01:56,777 [DEBUG]  @cert_sorter.py:117 - future products: []
2012-10-22 17:01:56,777 [DEBUG]  @cert_sorter.py:118 - partial stacks: []
2012-10-22 17:01:56,777 [DEBUG]  @cert_sorter.py:119 - valid stacks: []
2012-10-22 17:01:56,780 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:01:56,781 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:01:56,781 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:01:56,782 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:01:56,782 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:01:56,783 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-10-22 17:01:56,783 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/6930f9d3-1185-4b42-9a21-efb9a3865005/certificates/serials
2012-10-22 17:01:56,787 [WARNING]  @certmgr.py:91 - Exception caught while running certlib update
2012-10-22 17:01:56,788 [ERROR]  @certmgr.py:92 - (-2, 'Name or service not known')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 85, in update
    ret = self.certlib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 84, in _do_update
    return action.perform()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 219, in perform
    expected = self._get_expected_serials(report)
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 301, in _get_expected_serials
    exp = self.getCertificateSerialsList()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 294, in getCertificateSerialsList
    reply = self.uep.getCertificateSerials(self._getConsumerId())
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 685, in getCertificateSerials
    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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')
2012-10-22 17:01:56,800 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:01:56,801 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:01:56,802 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:01:56,802 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:01:56,802 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:01:56,803 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-10-22 17:01:56,803 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/6930f9d3-1185-4b42-9a21-efb9a3865005
2012-10-22 17:01:56,806 [WARNING]  @certmgr.py:103 - Exception caught while running <subscription_manager.certlib.IdentityCertLib object at 0x19f50a10> update
2012-10-22 17:01:56,806 [ERROR]  @certmgr.py:104 - (-2, 'Name or service not known')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 99, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 177, in _do_update
    consumer = self.uep.getConsumer(uuid)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 646, in getConsumer
    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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')
2012-10-22 17:01:56,808 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:01:56,809 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:01:56,809 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:01:56,809 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:01:56,810 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:01:56,810 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-10-22 17:01:56,811 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/6930f9d3-1185-4b42-9a21-efb9a3865005/release
2012-10-22 17:01:56,813 [WARNING]  @certmgr.py:103 - Exception caught while running <subscription_manager.repolib.RepoLib object at 0x19f50a90> update
2012-10-22 17:01:56,813 [ERROR]  @certmgr.py:104 - (-2, 'Name or service not known')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 99, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/repolib.py", line 43, in _do_update
    action = UpdateAction(uep=self.uep)
  File "/usr/share/rhsm/subscription_manager/repolib.py", line 108, in __init__
    result = self.uep.getRelease(self.consumer_uuid)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 783, in getRelease
    results = 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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')
2012-10-22 17:01:56,915 [DEBUG]  @cert_sorter.py:106 - Sorting product and entitlement cert status for: 2012-10-22 21:01:56.915165+00:00
2012-10-22 17:01:56,942 [DEBUG]  @cert_sorter.py:160 - Installed product IDs: ['100000000000006', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000060', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:01:56,942 [DEBUG]  @cert_sorter.py:113 - valid entitled products: []
2012-10-22 17:01:56,943 [DEBUG]  @cert_sorter.py:114 - expired entitled products: []
2012-10-22 17:01:56,943 [DEBUG]  @cert_sorter.py:115 - partially entitled products: []
2012-10-22 17:01:56,943 [DEBUG]  @cert_sorter.py:116 - unentitled products: ['100000000000060', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:01:56,943 [DEBUG]  @cert_sorter.py:117 - future products: []
2012-10-22 17:01:56,943 [DEBUG]  @cert_sorter.py:118 - partial stacks: []
2012-10-22 17:01:56,944 [DEBUG]  @cert_sorter.py:119 - valid stacks: []
2012-10-22 17:01:56,944 [INFO]  @factlib.py:52 - Facts have not changed, skipping upload.
2012-10-22 17:01:56,946 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:01:56,947 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:01:56,947 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:01:56,948 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:01:56,948 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:01:56,949 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-10-22 17:01:56,949 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/
2012-10-22 17:01:56,952 [WARNING]  @certmgr.py:103 - Exception caught while running <subscription_manager.cache.PackageProfileLib object at 0x19f50b50> update
2012-10-22 17:01:56,952 [ERROR]  @certmgr.py:104 - (-2, 'Name or service not known')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 99, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/cache.py", line 49, in _do_update
    return profile_mgr.update_check(self.uep, consumer_uuid)
  File "/usr/share/rhsm/subscription_manager/cache.py", line 214, in update_check
    if not uep.supports_resource(PACKAGES_RESOURCE):
  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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')
2012-10-22 17:01:56,979 [INFO]  @cache.py:160 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2012-10-22 17:01:56,979 [INFO]  @cache.py:175 - No changes.
2012-10-22 17:01:56,980 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:01:56,980 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:01:56,981 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:01:56,981 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:01:56,982 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:01:56,982 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-10-22 17:01:56,983 [DEBUG]  @connection.py:344 - Making request: POST https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/6930f9d3-1185-4b42-9a21-efb9a3865005/entitlements?pool=8a90f8763a8926d3013a8928f09b044b
2012-10-22 17:01:56,985 [ERROR]  @managercli.py:114 - Unable to subscribe: (-2, 'Name or service not known')
2012-10-22 17:01:56,985 [ERROR]  @managercli.py:115 - (-2, 'Name or service not known')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1289, in _do_command
    ents = self.cp.bindByEntitlementPool(consumer_uuid, pool, self.options.quantity)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 694, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 403, in request_post
    return self._request("POST", method, params)
  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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')

Comment 1 John Sefler 2012-10-22 21:09:37 UTC
Here is a similar error encountered when the proxy port is wrong (extra 0 at the end):

[root@jsefler-rhel59 ~]# subscription-manager subscribe --pool=8a90f8763a8926d3013a8928e54b0277 --proxy=auto-services.usersys.redhat.com:31280 --proxyuser=redhat --proxypassword=redhat
(111, 'Connection refused')
(111, 'Connection refused')
(111, 'Connection refused')
(111, 'Connection refused')
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@jsefler-rhel59 ~]# 


Additional info:
[root@jsefler-rhel59 ~]# tail -f /var/log/rhsm/rhsm.log

2012-10-22 17:07:38,120 [DEBUG]  @profile.py:95 - Loading current RPM profile.
2012-10-22 17:07:38,365 [INFO]  @managercli.py:252 - Client Versions: {'python-rhsm': '1.0.10-1.el5', 'subscription-manager': '1.0.23-1.el5'} 
2012-10-22 17:07:38,366 [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-10-22 17:07:38,366 [INFO]  @connection.py:511 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2012-10-22 17:07:38,366 [INFO]  @connection.py:508 - Using no auth
2012-10-22 17:07:38,367 [INFO]  @connection.py:511 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2012-10-22 17:07:38,367 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:07:38,368 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:07:38,369 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:07:38,369 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:07:38,369 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:07:38,370 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280
2012-10-22 17:07:38,370 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/
2012-10-22 17:07:38,386 [ERROR]  @utils.py:324 - Error while checking server version: (111, 'Connection refused')
2012-10-22 17:07:38,387 [ERROR]  @utils.py:326 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/utils.py", line 314, 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-10-22 17:07:38,481 [INFO]  @managercli.py:263 - Server Versions: {'candlepin': 'Unknown', 'server-type': 'subscription management service'} 
2012-10-22 17:07:38,592 [DEBUG]  @cert_sorter.py:106 - Sorting product and entitlement cert status for: 2012-10-22 21:07:38.592345+00:00
2012-10-22 17:07:38,617 [DEBUG]  @cert_sorter.py:160 - Installed product IDs: ['100000000000006', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000060', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:07:38,618 [DEBUG]  @cert_sorter.py:176 - Checking certificate: 5637039078017922864
2012-10-22 17:07:38,618 [DEBUG]  @cert_sorter.py:286 -   system has 2 sockets, 2 covered by entitlement
2012-10-22 17:07:38,619 [DEBUG]  @cert_sorter.py:113 - valid entitled products: ['37060']
2012-10-22 17:07:38,619 [DEBUG]  @cert_sorter.py:114 - expired entitled products: []
2012-10-22 17:07:38,619 [DEBUG]  @cert_sorter.py:115 - partially entitled products: []
2012-10-22 17:07:38,619 [DEBUG]  @cert_sorter.py:116 - unentitled products: ['100000000000060', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37062', '100000000000006', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:07:38,619 [DEBUG]  @cert_sorter.py:117 - future products: []
2012-10-22 17:07:38,619 [DEBUG]  @cert_sorter.py:118 - partial stacks: []
2012-10-22 17:07:38,620 [DEBUG]  @cert_sorter.py:119 - valid stacks: []
2012-10-22 17:07:38,624 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:07:38,624 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:07:38,624 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:07:38,625 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:07:38,625 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:07:38,626 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280
2012-10-22 17:07:38,626 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/7d252d81-30ef-4edd-83ac-1a2ce2d2d1eb/certificates/serials
2012-10-22 17:07:38,631 [WARNING]  @certmgr.py:91 - Exception caught while running certlib update
2012-10-22 17:07:38,631 [ERROR]  @certmgr.py:92 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 85, in update
    ret = self.certlib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 84, in _do_update
    return action.perform()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 219, in perform
    expected = self._get_expected_serials(report)
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 301, in _get_expected_serials
    exp = self.getCertificateSerialsList()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 294, in getCertificateSerialsList
    reply = self.uep.getCertificateSerials(self._getConsumerId())
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 685, in getCertificateSerials
    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')
2012-10-22 17:07:38,636 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:07:38,637 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:07:38,637 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:07:38,638 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:07:38,638 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:07:38,639 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280
2012-10-22 17:07:38,639 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/7d252d81-30ef-4edd-83ac-1a2ce2d2d1eb
2012-10-22 17:07:38,644 [WARNING]  @certmgr.py:103 - Exception caught while running <subscription_manager.certlib.IdentityCertLib object at 0x1dacca50> update
2012-10-22 17:07:38,644 [ERROR]  @certmgr.py:104 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 99, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 177, in _do_update
    consumer = self.uep.getConsumer(uuid)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 646, in getConsumer
    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')
2012-10-22 17:07:38,647 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:07:38,647 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:07:38,648 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:07:38,649 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:07:38,649 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:07:38,650 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280
2012-10-22 17:07:38,650 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/7d252d81-30ef-4edd-83ac-1a2ce2d2d1eb/release
2012-10-22 17:07:38,655 [WARNING]  @certmgr.py:103 - Exception caught while running <subscription_manager.repolib.RepoLib object at 0x1daccad0> update
2012-10-22 17:07:38,655 [ERROR]  @certmgr.py:104 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 99, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/repolib.py", line 43, in _do_update
    action = UpdateAction(uep=self.uep)
  File "/usr/share/rhsm/subscription_manager/repolib.py", line 108, in __init__
    result = self.uep.getRelease(self.consumer_uuid)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 783, in getRelease
    results = 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')
2012-10-22 17:07:38,781 [DEBUG]  @cert_sorter.py:106 - Sorting product and entitlement cert status for: 2012-10-22 21:07:38.781456+00:00
2012-10-22 17:07:38,812 [DEBUG]  @cert_sorter.py:160 - Installed product IDs: ['100000000000006', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000060', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:07:38,814 [DEBUG]  @cert_sorter.py:176 - Checking certificate: 5637039078017922864
2012-10-22 17:07:38,814 [DEBUG]  @cert_sorter.py:286 -   system has 2 sockets, 2 covered by entitlement
2012-10-22 17:07:38,815 [DEBUG]  @cert_sorter.py:113 - valid entitled products: ['37060']
2012-10-22 17:07:38,815 [DEBUG]  @cert_sorter.py:114 - expired entitled products: []
2012-10-22 17:07:38,815 [DEBUG]  @cert_sorter.py:115 - partially entitled products: []
2012-10-22 17:07:38,815 [DEBUG]  @cert_sorter.py:116 - unentitled products: ['100000000000060', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37062', '100000000000006', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '88888', '917571', '37070']
2012-10-22 17:07:38,816 [DEBUG]  @cert_sorter.py:117 - future products: []
2012-10-22 17:07:38,816 [DEBUG]  @cert_sorter.py:118 - partial stacks: []
2012-10-22 17:07:38,816 [DEBUG]  @cert_sorter.py:119 - valid stacks: []
2012-10-22 17:07:38,817 [INFO]  @factlib.py:52 - Facts have not changed, skipping upload.
2012-10-22 17:07:38,819 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:07:38,820 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:07:38,820 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:07:38,821 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:07:38,821 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:07:38,822 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280
2012-10-22 17:07:38,822 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/
2012-10-22 17:07:38,834 [WARNING]  @certmgr.py:103 - Exception caught while running <subscription_manager.cache.PackageProfileLib object at 0x1daccbd0> update
2012-10-22 17:07:38,836 [ERROR]  @certmgr.py:104 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 99, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/cache.py", line 49, in _do_update
    return profile_mgr.update_check(self.uep, consumer_uuid)
  File "/usr/share/rhsm/subscription_manager/cache.py", line 214, in update_check
    if not uep.supports_resource(PACKAGES_RESOURCE):
  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-10-22 17:07:38,876 [INFO]  @cache.py:160 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2012-10-22 17:07:38,877 [INFO]  @cache.py:175 - No changes.
2012-10-22 17:07:38,878 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-10-22 17:07:38,879 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-10-22 17:07:38,879 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-10-22 17:07:38,880 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-10-22 17:07:38,880 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-10-22 17:07:38,881 [DEBUG]  @connection.py:329 - Using proxy: auto-services.usersys.redhat.com:31280
2012-10-22 17:07:38,882 [DEBUG]  @connection.py:344 - Making request: POST https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/7d252d81-30ef-4edd-83ac-1a2ce2d2d1eb/entitlements?pool=8a90f8763a8926d3013a8928e54b0277
2012-10-22 17:07:38,888 [ERROR]  @managercli.py:114 - Unable to subscribe: (111, 'Connection refused')
2012-10-22 17:07:38,889 [ERROR]  @managercli.py:115 - (111, 'Connection refused')
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1289, in _do_command
    ents = self.cp.bindByEntitlementPool(consumer_uuid, pool, self.options.quantity)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 694, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 403, in request_post
    return self._request("POST", method, params)
  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 John Sefler 2012-10-22 21:13:11 UTC
Here is yet another similar error encountered when the proxy password is bad:

[root@jsefler-rhel59 ~]# subscription-manager subscribe --pool=8a90f8763a8926d3013a8928e66d02a1 --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=bad-password
Proxy connection failed: 407
Proxy connection failed: 407
Proxy connection failed: 407
Proxy connection failed: 407
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
<NOT PASTED>

Comment 4 Adrian Likins 2012-12-05 20:28:45 UTC
I think this behaviour is ok. (I'd prefer even more detailed error messages and finer grained error handling though). 

But for now, I don't think this is a blocker, so moving to 6.5

Comment 8 John Sefler 2013-09-06 22:46:37 UTC
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager python-rhsm python
subscription-manager-1.9.5-1.el6.x86_64
python-rhsm-1.9.4-1.el6.x86_64
python-2.6.6-49.el6.x86_64

[root@jsefler-6 ~]# subscription-manager attach --pool=8a99f9843c01ccba013c04609af80bcc  --proxy=bad-proxy
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

Comment 9 errata-xmlrpc 2013-11-21 21:22:39 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-1659.html


Note You need to log in before you can comment on or make changes to this bug.