subscription-manager commands fail with [Errno -8] Servname not supported for ai_socktype

Solution Unverified - Updated -

Issue

  • When trying to attach a subscription to a system using subscription-manager attach command fails. /var/log/rhsm/rhsm.log shows errors:
2015-01-07 13:03:48,111 [ERROR] subscription-manager @managercli.py:154 - Unable to attach: [Errno -8] Servname not supported for ai_socktype
2015-01-07 13:03:48,111 [ERROR] subscription-manager @managercli.py:155 - [Errno -8] Servname not supported for ai_socktype
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1437, in _do_command
    ents = self.cp.bindByEntitlementPool(self.identity.uuid, pool, self.options.quantity)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 954, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 553, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 453, in _request
    conn.request(request_type, handler, body=body, headers=headers)
  File "/usr/lib64/python2.6/httplib.py", line 914, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.6/httplib.py", line 951, in _send_request
    self.endheaders()
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 198, in endheaders
    httpslib.HTTPSConnection.endheaders(self)
  File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
    self._send_output()
  File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.6/httplib.py", line 739, in send
    self.connect()
  File "/usr/lib64/python2.6/site-packages/M2Crypto/httpslib.py", line 192, in connect
    HTTPConnection.connect(self)
  File "/usr/lib64/python2.6/httplib.py", line 720, in connect
    self.timeout)
  File "/usr/lib64/python2.6/socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -8] Servname not supported for ai_socktype

Environment

  • Red Hat Enterprise Linux 5.7+
  • Red Hat Enterprise Linux 6.1+
  • Red Hat Enterprise Linux 7
  • Red Hat Subscription Manager

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In