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.

Unable to register host while adding node in the cluster.

Highlighted

Unable to register host while adding node in the cluster.

New Contributor
2019-05-24 22:58:19,792 INFO [Thread-36] BSRunner:312 - Script log Mesg
INFO:root:BootStrapping hosts ['nn02.vijayan.com',

'dn01.vijayan.com',

'dn02.vijayan.com',

'dn03.vijayan.com'] using /usr/lib/ambari-server/lib/ambari_server cluster primary OS: redhat7 with user 'root'with ssh Port '22' sshKey File /var/run/ambari-server/bootstrap/3/sshKey password File null using tmp dir /var/run/ambari-server/bootstrap/3 ambari: nn01.vijayan.com; server_port: 8080; ambari version: 2.7.3.0; user_run_as: root

INFO:root:Executing parallel bootstrap

ERROR:root:ERROR: Bootstrap of host dn01.vijayan.com fails because previous action finished with non-zero exit code (1)

ERROR MESSAGE: Connection to dn01.vijayan.com closed.


	


STDOUT: Host registration aborted. Ambari Agent host cannot reach Ambari Server 'nn01.vijayan.com:8080'. Please check the network connectivity between the Ambari Agent host and the Ambari Server


	


Connection to dn01.vijayan.com closed.


	


ERROR:root:ERROR: Bootstrap of host dn02.vijayan.com fails because previous action finished with non-zero exit code (1)

ERROR MESSAGE: Connection to dn02.vijayan.com closed.


	


STDOUT: Host registration aborted. Ambari Agent host cannot reach Ambari Server 'nn01.vijayan.com:8080'. Please check the network connectivity between the Ambari Agent host and the Ambari Server


	


Connection to dn02.vijayan.com closed.


	


ERROR:root:ERROR: Bootstrap of host nn02.vijayan.com fails because previous action finished with non-zero exit code (1)

ERROR MESSAGE: Connection to nn02.vijayan.com closed.


	


STDOUT: Host registration aborted. Ambari Agent host cannot reach Ambari Server 'nn01.vijayan.com:8080'. Please check the network connectivity between the Ambari Agent host and the Ambari Server


	


Connection to nn02.vijayan.com closed.


1 REPLY 1

Re: Unable to register host while adding node in the cluster.

Mentor

@Vijayan Sundaram

The below message is repeated for all the failed hosts, I assume you are on RH/Centos if not readapt the below to suit your OS

First, you MUST ensure you followed the HWX recommendations for preparing the environment

Host registration aborted. Ambari Agent host cannot reach Ambari Server 'nn01.vijayan.com:8080'. Please check the network connectivity between the Ambari Agent host and the Ambari Server Connection to dn0x.vijayan.com closed

Option 1

Can you check that the /etc/hosts entries on all the hosts are identically meaning all hosts in the cluster have entries in the /etc/hosts eg the format IP HOSTNAME ALIAS


192.168.x.x   nn01.vijayan.com        nn01
192.168.x.x   dn01.vijayan.com        dn01
192.168.x.x   dn02.vijayan.com        dn02
192.168.x.x   dn03.vijayan.com        dn03

Validate that the passwordless connect is working between the Ambari host and all the hosts in the cluster

From the ambari host

# ssh root@dn0x.vijayan.com

Should succeed if not do the following

# copy the public key to all other hosts from the Ambari host

cat .ssh/id_rsa.pub | ssh root@dn01.vijayan.com 'cat >> .ssh/authorized_keys'
cat .ssh/id_rsa.pub | ssh root@dn02.vijayan.com 'cat >> .ssh/authorized_keys'
cat .ssh/id_rsa.pub | ssh root@dn03.vijayan.com 'cat >> .ssh/authorized_keys'

Change the permission on the dn0x

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Now retry registering the hosts it should succeed

Option 2

On all the that failed to register ensure the /etc/yum.repos.d/* from the Ambari host is distributed to all the otherhosts

Run the below command on hosts dnx as root user

# yum repolist

The manually install ambari-agent

# yum install -y ambari-agent

Edit on those hosts the /etc/ambari-agent/conf/ambari-agent.ini the hostname in this sector should point to the ambari server

[server]
hostname={Ambari-server-FQDN}
url_port=8440
secured_url_port=8441
connect_retry_delay=10
max_reconnect_retry_delay=30

After doing this on all the dnx hosts, start the amabri-agent

# ambari-agent start

This should succeed, now go back to the ambari UI to register the new hosts after adding the hostname (FQDN) and choose manual registration

This should succeed.