CM Agent fails with 'Name or service not known' on 'HostPort(socket.gethostbyname(w[0]), port)'

0 votes
0 views
asked Aug 28, 2017 in Hadoop by admin (4,410 points)
Summary
Last Published Date5/16/2017 8:40 AM
Symptoms

Host Inspector fails for a specific host and Host Monitor is out of contact with the host.

CM Agent log at /var/log/cloudera-scm-agent/cloudera-scm-agent.log logs the following exception:

Traceback (most recent call last):
File "/usr/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.8.3-py2.6.egg/cmf/agent.py", line 1378, in handle_heartbeat_response
self._handle_heartbeat_response(response)
File "/usr/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.8.3-py2.6.egg/cmf/agent.py", line 1400, in _handle_heartbeat_response
response["flood_torrent_port"])
File "/usr/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.8.3-py2.6.egg/cmf/agent.py", line 1834, in handle_heartbeat_flood
flood_dir)
File "/usr/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.8.3-py2.6.egg/cmf/downloader.py", line 179, in __init__
self.client = TorrentRPCClient(server)
File "/usr/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.8.3-py2.6.egg/flood/util/rpc.py", line 118, in __init__
server = resolveHostPort(server, self.DEFAULT_RPC_PORT)
File "/usr/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.8.3-py2.6.egg/flood/util/rpc.py", line 33, in resolveHostPort
return HostPort(socket.gethostbyname(w[0]), port)
gaierror: [Errno -2] Name or service not known

Applies To
Cause

If localhost entry in /etc/hosts is commented out or missing, the exception will occur.

For example:
# 127.0.0.1 localhost

Instructions

1. Uncomment the localhost entry in /etc/hosts or add the entry.  

For example:
127.0.0.1 localhost

2. Restart the CM Agent.  

3. If the host is also where the CM Server is running, also restart the CM Server.

Please log in or register to answer this question.

...