Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

unable to join Amabari server to cluster

avatar
Explorer

step 1 get rsa key from umbari host

	# cat /root/.ssh/id_rsa

step 2 Amabri web UI choose Hosts...Action Add Host. enter ambari.example.com in Target Hosts Field

Paste the key from step 1 into where it asks for 'ssh prv key'

step 3 click button Register and confirm....

returns Failed

		==========================
Creating target directory...
==========================
Command start time 2019-02-05 14:23:08
root@ambari.example.com: Permission denied (publickey,password).

		SSH command execution finished
host=ambari.example.com, exitcode=255

		Command end time 2019-02-05 14:23:08

ERROR: Bootstrap of host ambari.example.com fails because previous action finished with non-zero exit code (255)

		ERROR MESSAGE: root@ambari.example.com: Permission denied (publickey,password).

STDOUT: 
root@ambari.example.com: Permission denied (publickey,password).
	
OK
1 ACCEPTED SOLUTION

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
29 REPLIES 29

avatar
Master Mentor

@Tom Burke

1. Please make sure that the permission on these files are correct as following:

# ls -lart /root/.ssh/
total 20
-rw-r--r--. 1 root root  409 Jul 21  2018 id_rsa.pub
-rw-------. 1 root root 1679 Jul 21  2018 id_rsa

.

2. Also please make sure that the id_rsa files are generated on the host after fixing the hostname. (if the host was having multiple hostname earlier then please regenerate the keys again)

Also make sure to copy this public key to the mentioned hosts (and all cluster hosts)

# ssh-copy-id -i ~/.ssh/id_rsa.pub root@ambari.example.com

.

3. Also for a quick check if the passwordless SSH is setup already then you should be able to do SSH without entering password nexttime.

# ssh root@ambari.example.com


avatar
Explorer

Hi Jay

I was missing the ssh-copy-id -i ~/.ssh/id_rsa.pub root@ambari.example.com

I did the above and tested OK passwd-less root login to the ambari box.

Returned Failed but now with... ( thanks again!)

==========================
Creating target directory...
==========================


Command start time 2019-02-05 15:14:41
chmod: cannot access '/var/lib/ambari-agent/data': No such file or directory


Connection to ambari.example.com closed.
SSH command execution finished
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:42


==========================
Copying ambari sudo script...
==========================


Command start time 2019-02-05 15:14:42


scp /var/lib/ambari-server/ambari-sudo.sh
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:42


==========================
Copying common functions script...
==========================


Command start time 2019-02-05 15:14:42


scp /usr/lib/ambari-server/lib/ambari_commons
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:43


==========================
Copying create-python-wrap script...
==========================


Command start time 2019-02-05 15:14:43


scp /var/lib/ambari-server/create-python-wrap.sh
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:43


==========================
Copying OS type check script...
==========================


Command start time 2019-02-05 15:14:43


scp /usr/lib/ambari-server/lib/ambari_server/os_check_type.py
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:44


==========================
Running create-python-wrap script...
==========================


Command start time 2019-02-05 15:14:44


Connection to ambari.example.com closed.
SSH command execution finished
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:45


==========================
Running OS type check...
==========================


Command start time 2019-02-05 15:14:45
Cluster primary/cluster OS family is ubuntu18 and local/current OS family is ubuntu18


Connection to ambari.example.com closed.
SSH command execution finished
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:45


==========================
Checking 'sudo' package on remote host...
==========================


Command start time 2019-02-05 15:14:45


Connection to ambari.example.com closed.
SSH command execution finished
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:46


==========================
Copying repo file to 'tmp' folder...
==========================


Command start time 2019-02-05 15:14:46


scp /etc/apt/sources.list.d/ambari.list
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:46


==========================
Moving file to repo dir...
==========================


Command start time 2019-02-05 15:14:46


Connection to ambari.example.com closed.
SSH command execution finished
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:47


==========================
Changing permissions for ambari.repo...
==========================


Command start time 2019-02-05 15:14:47


Connection to ambari.example.com closed.
SSH command execution finished
host=ambari.example.com, exitcode=0
Command end time 2019-02-05 15:14:47


==========================
Update apt cache of repository...
==========================


Command start time 2019-02-05 15:14:47


0% [Working]
0% [Working]
            
Get:1 http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.1.0 Ambari InRelease [3,187 B]


0% [1 InRelease 3,187 B/3,187 B 100%]
                                     

avatar
Master Mentor

@Tom Burke

This time i do not see it is failing with the the previous error.

But it is strange to see that you are planning to use too old Ambari 2.2.1.0 as i see your output as following:

Get:1 http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.1.0 Ambari InRelease [3,187 B]

.

Is there any specific reason for choosing so old Ambari version?

Latest ambari release is 2.7.3

.

avatar
Explorer

Hi Jay - No particular reason. I inherited the cluster install that was made from a recent download l( like 3 weeks ago from your site ) so I assumed pretty new.

Ambari machine still does not show in Hosts?

avatar
Explorer

Could our problem be this old version?

avatar
Master Mentor

@Tom Burke

Can you also please check on the agent host to know why it is referring to Old ambari version 2.2.1.0?

May be on the problematic host you can try running this command to find out which version is it using?

# dpkg --list | grep ambari

.

avatar
Explorer

ambari-server 2.7.3.0-139 amd64 Ambari Server

avatar
Master Mentor

@Tom Burke

i meant to say on the host where the Agent registration is failing can you check from where Ambari 2.2.1.0 binaries are coming because we saw in your output as :

http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.1.0 Ambari 

.

Or can you please share the "ambari-agent.log" from the host where the agent setup is failing?

"/var/log/ambari-agent/ambari-agent.log"

avatar
Explorer

The host I cannot join to cluster is the Ambari server itself , I thought this was needed fro my reading of docs for the cluster in order to run the enable kerberos wizard. But seems not needed from your previous comment. I can run the command regardless , here are returns form one member compute1

root@compute1:~# dpkg --list | grep ambari

ii ambari-agent 2.7.3.0-139 amd64 Ambari Agent

ii ambari-infra-solr-client 2.7.3.0-139 amd64 [[description]]

ii ambari-metrics-assembly 2.7.3.0-139 amd64 Ambari Metrics Assembly