Support Questions

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

Problem during Ambari Confirm Hosts

avatar
Expert Contributor

I am trying to add two more hosts to my existing cluster (only has one right now) but I am running into errors during the Ambari step - Confirm Hosts. The error message is shown below. It says it failed because it finished with a non zero exit code. What does this mean and how can I fix it? I have followed the steps to configure passwordless ssh but I may have done something incorrectly. I have replace the host name with a bunch of x's.

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


Command start time 2016-02-23 10:45:50


Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
SSH command execution finished
host=xxxxxxxxxxxxxxxxxxxxx, exitcode=255
Command end time 2016-02-23 10:45:51


ERROR: Bootstrap of host xxxxxxxxxxxxxxxxxxxx fails because previous action finished with non-zero exit code (255)
ERROR MESSAGE: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).


STDOUT: 
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
1 ACCEPTED SOLUTION

avatar
Master Mentor
@Mark Thorson

This is related to your ssh keys

Make sure that you test this

ssh localhost

if it asks for password then

cd ~/.ssh

cat id_rsa.pub >> authorized_keys

ssh localhost

View solution in original post

26 REPLIES 26

avatar
Expert Contributor

@Neeraj Sabharwal I took a closer look at what I typed in before on the ini file and realized I made a typo in the server hostname. I fixed it and got everything installed and working! Thanks so much for your help getting my cluster working. I wouldn't have been able to do it without your support!

avatar
Master Mentor

@Mark Thorson It's team work 😉 You are great!

avatar
Master Mentor

@Mark Thorson

On the Ambari server as root

cd ./ssh

cat id_rsa.pub >> authorized_keys

then copy the authorized_keys to the .ssh/ directory on 2 remote hosts you want to add to your cluster.

Validate from the Ambari server that the password less setup is working on the first attempt it will ask for the password thats normal buy subsequently it shouldn't ask for the ambari root password .

Apart from that the are a couple of checks on the client to add to the cluster eg Firewall,NTP ;SeLinux etc check this doc attached

avatar
Contributor

Hello,

I followed the steps to the dot!

I still cannot ssh without password.

I copy the id_rsa.pub file to the /root/.ssh of the target host: scp /root/.ssh/id_rsa.pub root@IP:/root/.ssh

then on target host:

cat id_rsa.pub>>authorized_keys

Still cannot ssh from my main server, please help!

avatar
Expert Contributor

There is another potential problem. If this is your SECOND attempt after restarting the entire process, there is a BUG.

If this is the second attempt after a successful SSH. Then try the alternative option for manual install. It will work if the agents are running and vi /etc/ambari-agent/conf/ambari-agent.ini

  1. [server]

    hostname=<your.ambari.server.hostname>

    url_port=8440

    secured_url_port=8441

  2. Start the agent on every host in your cluster.

    ambari-agent start

avatar
Cloudera Employee

This can be related to the /etc/hosts entries too. Check for the IP addresses and Hostnames of the same nodes in the cluster

Should be aligned correctly, IP of the host-1 should be set in with that host-1 only.

avatar
New Contributor

Hi, I am struggling with the ame Problem.

Mainserver: hadoopmain.hadoop.local

Host1: node1.hadoop.local

Host2. node2.hadoop.local

I configured as it was set in the manual and when I try to connect via ssh it is working without password

So I am logged in as root in the Mainserver hadoopmain.hadoop.local

I then enter: ssh root@node1.hadoop.local

And then I am logged on the node1 without being asked for a password.

Nevertheless I a getting the failure:

========================== Creating target directory... ========================== Command start time 2019-02-15 12:12:13 Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). SSH command execution finished host=node1.hadoop.local, exitcode=255 Command end time 2019-02-15 12:12:13 ERROR: Bootstrap of host node1.hadoop.local fails because previous action finished with non-zero exit code (255) ERROR MESSAGE: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). STDOUT: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).