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

Solution Unverified - Updated -


  • 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 - Unable to attach: [Errno -8] Servname not supported for ai_socktype
2015-01-07 13:03:48,111 [ERROR] subscription-manager - [Errno -8] Servname not supported for ai_socktype
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/", line 1437, in _do_command
    ents = self.cp.bindByEntitlementPool(self.identity.uuid, pool, self.options.quantity)
  File "/usr/lib64/python2.6/site-packages/rhsm/", line 954, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/usr/lib64/python2.6/site-packages/rhsm/", line 553, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/", line 453, in _request
    conn.request(request_type, handler, body=body, headers=headers)
  File "/usr/lib64/python2.6/", line 914, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.6/", line 951, in _send_request
  File "/usr/lib64/python2.6/site-packages/rhsm/", line 198, in endheaders
  File "/usr/lib64/python2.6/", line 908, in endheaders
  File "/usr/lib64/python2.6/", line 780, in _send_output
  File "/usr/lib64/python2.6/", line 739, in send
  File "/usr/lib64/python2.6/site-packages/M2Crypto/", line 192, in connect
  File "/usr/lib64/python2.6/", line 720, in connect
  File "/usr/lib64/python2.6/", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -8] Servname not supported for ai_socktype


  • 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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content