Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I am unable to add a new node due to a problem with the hostnames confirgurations. Please help me with this.

I am unable to add a new node due to a problem with the hostnames confirgurations. Please help me with this.

========================== Creating target directory... ========================== Command start time 2017-07-04 03:20:41 Connection to firstnode.localhost closed. SSH command execution finished host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:43 ========================== Copying common functions script... ========================== Command start time 2017-07-04 03:20:43 scp /usr/lib/python2.6/site-packages/ambari_commons host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:44 ========================== Copying OS type check script... ========================== Command start time 2017-07-04 03:20:44 scp /usr/lib/python2.6/site-packages/ambari_server/os_check_type.py host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:44 ========================== Running OS type check... ========================== Command start time 2017-07-04 03:20:44 Cluster primary/cluster OS family is redhat7 and local/current OS family is redhat7 Connection to firstnode.localhost closed. SSH command execution finished host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:45 ========================== Checking 'sudo' package on remote host... ========================== Command start time 2017-07-04 03:20:45 sudo-1.8.6p7-23.el7_3.x86_64 Connection to firstnode.localhost closed. SSH command execution finished host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:47 ========================== Copying repo file to 'tmp' folder... ========================== Command start time 2017-07-04 03:20:47 scp /etc/yum.repos.d/ambari.repo host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:48 ========================== Moving file to repo dir... ========================== Command start time 2017-07-04 03:20:48 Connection to firstnode.localhost closed. SSH command execution finished host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:49 ========================== Changing permissions for ambari.repo... ========================== Command start time 2017-07-04 03:20:49 Connection to firstnode.localhost closed. SSH command execution finished host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:50 ========================== Copying setup script file... ========================== Command start time 2017-07-04 03:20:50 scp /usr/lib/python2.6/site-packages/ambari_server/setupAgent.py host=firstnode.localhost, exitcode=0 Command end time 2017-07-04 03:20:51 ========================== Running setup agent script... ========================== Command start time 2017-07-04 03:20:51 Repository HDP-UTILS-1.1.0.20 is listed more than once in the configuration ('WARNING 2017-07-04 03:12:38,638 scheduler.py:496 - Run time of job "5ab4e601-2133-4bf0-ad3a-5b18e4f4616f (trigger: interval[0:01:00], next run at: 2017-07-04 03:13:37.317113)" was missed by 0:00:01.320968 INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:47,672 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,335 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:12:48,337 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:12:48,340 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:12:48,341 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,716 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:20:56,722 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:20:56,727 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:20:56,729 ExitHelper.py:53 - Performing cleanup before exiting... ', None) ('WARNING 2017-07-04 03:12:38,638 scheduler.py:496 - Run time of job "5ab4e601-2133-4bf0-ad3a-5b18e4f4616f (trigger: interval[0:01:00], next run at: 2017-07-04 03:13:37.317113)" was missed by 0:00:01.320968 INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:47,672 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,335 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:12:48,337 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:12:48,340 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:12:48,341 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,716 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:20:56,722 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:20:56,727 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:20:56,729 ExitHelper.py:53 - Performing cleanup before exiting... ', None) Connection to firstnode.localhost closed. SSH command execution finished host=firstnode.localhost, exitcode=255 Command end time 2017-07-04 03:20:59 ERROR: Bootstrap of host firstnode.localhost fails because previous action finished with non-zero exit code (255) ERROR MESSAGE: Connection to firstnode.localhost closed. STDOUT: Repository HDP-UTILS-1.1.0.20 is listed more than once in the configuration ('WARNING 2017-07-04 03:12:38,638 scheduler.py:496 - Run time of job "5ab4e601-2133-4bf0-ad3a-5b18e4f4616f (trigger: interval[0:01:00], next run at: 2017-07-04 03:13:37.317113)" was missed by 0:00:01.320968 INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:47,672 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,335 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:12:48,337 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:12:48,340 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:12:48,341 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,716 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:20:56,722 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:20:56,727 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:20:56,729 ExitHelper.py:53 - Performing cleanup before exiting... ', None) ('WARNING 2017-07-04 03:12:38,638 scheduler.py:496 - Run time of job "5ab4e601-2133-4bf0-ad3a-5b18e4f4616f (trigger: interval[0:01:00], next run at: 2017-07-04 03:13:37.317113)" was missed by 0:00:01.320968 INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:42,606 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:47,672 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,333 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:12:48,335 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:12:48,337 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:12:48,340 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:12:48,341 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:12:48,341 ExitHelper.py:53 - Performing cleanup before exiting... INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,713 main.py:74 - loglevel=logging.INFO INFO 2017-07-04 03:20:56,716 DataCleaner.py:39 - Data cleanup thread started INFO 2017-07-04 03:20:56,722 DataCleaner.py:120 - Data cleanup started INFO 2017-07-04 03:20:56,727 DataCleaner.py:122 - Data cleanup finished ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2017-07-04 03:20:56,729 main.py:143 - Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly INFO 2017-07-04 03:20:56,729 ExitHelper.py:53 - Performing cleanup before exiting... ', None) Connection to firstnode.localhost closed.

4 REPLIES 4
Highlighted

Re: I am unable to add a new node due to a problem with the hostnames confirgurations. Please help me with this.

Super Mentor

@

Mohamed Gougam

You are getting the following message:

Ambari agent machine hostname (localhost.localdomain) does not match expected ambari server hostname (firstnode.localhost). 

- Please make sure that on all the cluster nodes you have "/etc/hosts" file will the identicle entries. Which means every host of your cluster will be able to resolve each other.

In your ambari agent machine you might not have set the hostname correctly as it is showing "localhost.localdomain". Please refer to the following doc to know how to set the FQDN ("hostname -f")

1. https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-installation/content/edit_the_hos...

2. https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-installation/content/edit_the_net...

3. https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-installation/content/edit_the_net...

.

On all hosts following command should return proper results. And Ambari Server should be able to resolve all those hosts with their FQDN.

# hostname -f 

The following command should show the correct FQDN and each hosts FQDN should be resolved/reachable by other hosts as well.

.

Example: In my cluster i have "erie1.example.com" as my Ambari Server and ambari agents are installed on all 4 hosts. So i have the following entry in all hosts "/etc/hosts" file.

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.12.22.151 erie1.example.com 
172.12.22.152 erie2.example.com 
172.12.22.153 erie3.example.com 
172.12.22.154 erie4.example.com 

.

Highlighted

Re: I am unable to add a new node due to a problem with the hostnames confirgurations. Please help me with this.

Thanks a lot Jay for the clarification. In my case, the network file is blank hence, when I try to fill it with: networking and hostname commands, I get a warning when I restart the instance saying "NETWORKING: COMMAND NOT FOUND.

What ever I do the hostname doesn't change. I tried hostname localhost.localhost. it doesn't change and the hostname -f displays just localhost instead of the full domain. I made sure that the hosts files are exactly the same to make sure the two instances are able to resolve each other.

Please note that my cluster has only two hosts. The master and the one I am trying to add.

Thanking you in advance.

MOHAMED GOUGAM

Highlighted

Re: I am unable to add a new node due to a problem with the hostnames confirgurations. Please help me with this.

The other interesting thing in the output is that, it is considering the firstnode.localhost as the ambari server and localhost.localhost as the agent. whereas in the firstnode the ambari server is not even installed. I know this can be just me who is confused. I would truely appreciate your help in clarifying this for me. What am I missing.

ERROR 2017-07-04 08:10:46,640 main.py:143 - Ambari agent machine hostname (localhost.localhost) does not match expected ambari server hostname (firstnode.localhost). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly
Highlighted

Re: I am unable to add a new node due to a problem with the hostnames confirgurations. Please help me with this.

Greetings everyone,

I would truly appreciate it if someone assists me on the above. I re-installed ambari-server and it is still giving me the same output as the above.

Don't have an account?
Coming from Hortonworks? Activate your account here