Bug 848184 - Error while checking server version: (-2, 'Name or service not known')
Error while checking server version: (-2, 'Name or service not known')
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Bryan Kearney
Entitlement Bugs
: Regression
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-08-14 16:38 EDT by John Sefler
Modified: 2013-01-10 04:48 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:58:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2012-08-14 16:38:21 EDT
Description of problem:
Many 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 register --username testuser1 --password password --org admin
The system has been registered with id: 77e2fba6-8d33-420e-91fb-fa129483aee4 
[root@jsefler-rhel59 ~]# subscription-manager identity --proxy=bad-proxy
Error while checking server version: (-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:
see above

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:32:50,849 [DEBUG]  @profile.py:95 - Loading current RPM profile.
2012-08-14 16:32:51,056 [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:32:51,057 [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:32:51,057 [INFO]  @connection.py:511 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2012-08-14 16:32:51,059 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-08-14 16:32:51,059 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-08-14 16:32:51,060 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-08-14 16:32:51,060 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-08-14 16:32:51,061 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-08-14 16:32:51,061 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/
2012-08-14 16:32:51,075 [ERROR]  @utils.py:316 - (-2, 'Name or service not known')
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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')
2012-08-14 16:32:51,180 [DEBUG]  @managercli.py:263 - Server Versions: {'candlepin': 'Unknown', 'server-type': 'Unknown'} 
2012-08-14 16:32:51,185 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-08-14 16:32:51,185 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-08-14 16:32:51,186 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-08-14 16:32:51,187 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-08-14 16:32:51,188 [DEBUG]  @connection.py:329 - Using proxy: bad-proxy:3128
2012-08-14 16:32:51,188 [DEBUG]  @connection.py:344 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/77e2fba6-8d33-420e-91fb-fa129483aee4/owner
2012-08-14 16:32:51,192 [ERROR]  @managercli.py:114 - Error: Unable to generate a new identity for the system
2012-08-14 16:32:51,192 [ERROR]  @managercli.py:115 - (-2, 'Name or service not known')
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 620, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')
Comment 2 Bryan Kearney 2012-08-16 16:26:12 EDT
fixed in master at 6266cfc553941ad3668d4bdd26e94362e7536740.
Comment 3 Shwetha Kallesh 2012-08-17 07:33:39 EDT
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=bad-proxy
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
Comment 5 errata-xmlrpc 2013-01-07 22:58:53 EST
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

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