Unable to register to RHSM; [Errno -5] No address associated with hostname
Issue
# subscription-manager register fails with the following error:
# subscription-manager register --username= --password=
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
When we look at /var/log/rhsm/rhsm.log, we see the error below:
2017-08-13 13:33:06,715 [INFO] @connection.py:549 - Connection Built: host: subscription.rhn.redhat.com, port: 443, handler: /subscription
2017-08-13 13:33:06,716 [INFO] @connection.py:545 - Using no auth
2017-08-13 13:33:06,716 [INFO] @connection.py:549 - Connection Built: host: subscription.rhn.redhat.com, port: 443, handler: /subscription
2017-08-13 13:33:06,767 [DEBUG] @connection.py:360 - Loading CA PEM certificates from: /etc/rhsm/ca/
2017-08-13 13:33:06,767 [DEBUG] @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2017-08-13 13:33:06,768 [DEBUG] @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2017-08-13 13:33:06,768 [DEBUG] @connection.py:381 - Making request: GET /subscription/
2017-08-13 13:33:06,770 [ERROR] @utils.py:374 - Error while checking server version: [Errno -5] No address associated with hostname
2017-08-13 13:33:06,770 [ERROR] @utils.py:376 - [Errno -5] No address associated with hostname
Traceback (most recent call last):
File "/usr/share/rhsm/subscription_manager/utils.py", line 364, in get_server_versions
if cp.supports_resource("status"):
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 575, in supports_resource
self._load_supported_resources()
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 562, in _load_supported_resources
resources_list = self.conn.request_get("/")
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 437, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 387, 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/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 51, in connect
socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
gaierror: [Errno -5] No address associated with hostname
Environment
- Red Hat Enterprise Linux 6
- Red Hat Subscription Manager
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
