Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

ambari-agent won't start

Contributor

adding new nodes to my cluster, I have one that I cannot get the ambari-agent to start

RHEL 6.9, HDP-2.6.0.3, ambari 2.5.0.3, ambari-agent-2.5.0.3-7.x86_64

I get the following error in the ambari-agent log

ERROR 2017-09-25 14:59:26,625 Controller.py:502 - Controller thread failed with exception:

Traceback (most recent call last):

File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 489, in run self.register = Register(self.config)

File "/usr/lib/python2.6/site-packages/ambari_agent/Register.py", line 35, in __init__ self.hardware = Hardware(self.config)

File "/usr/lib/python2.6/site-packages/ambari_agent/Hardware.py", line 52, in __init__ self.hardware.update(Facter(self.config).facterInfo())

File "/usr/lib/python2.6/site-packages/ambari_agent/Facter.py", line 571, in facterInfo facterInfo = super(FacterLinux, self).facterInfo()

File "/usr/lib/python2.6/site-packages/ambari_agent/Facter.py", line 248, in facterInfo 'ipaddress': self.getIpAddress(),

File "/usr/lib/python2.6/site-packages/ambari_agent/Facter.py", line 81, in getIpAddress return socket.gethostbyname(self.getFqdn().lower())

gaierror: [Errno -2] Name or service not known

1 REPLY 1

Super Mentor

@Jon Page

The following Commands should return the same Hostname for the agent on the agent host and ambari server should also have the /etc/hosts entry to determine that agent with it's FQDN.

# hostname -f
# python -c 'import socket;print socket.getfqdn()'


So please check if your ambari agents has correct host name defined in the following files? These files should have correct hostname defind.

# cat /etc/hosts
# cat /etc/sysconfig/network


Following link provides more information about how you can set the correct hostname for an agent/server:


1. https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-installation/content/check_dns.ht...

2. https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-installation/content/edit_the_hos...

3. https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-installation/content/set_the_host...

4. https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-installation/content/edit_the_net...

.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.