Support Questions

Find answers, ask questions, and share your expertise

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

@Tom Burke

Are you really checking what kind of command aere you executing in curl and what does every curl argument means?

Before attaching the "hosts4.json" if you would have just checked the content of this file then you would know that the credentials which you are entering in curl command are Wrong ambari admin credential.

# cat hosts4.json 
{
  "status": 403,
  "message": "Unable to sign in. Invalid username/password combination."
}

.

As i do not know your ambari admin credentials hence i just gave you a dummy curl command and expected that you will change the values according to your cluster.

View solution in original post

29 REPLIES 29

avatar
Explorer

Hi Jay, thansk for help , uncertain what asked last , want this output again? attached.hosts-2.json

avatar
Master Mentor

attached file is corrupted.

avatar
Explorer

another host3.json

hosts3.json

avatar
Master Mentor

@Tom Burke

Please change the protocol to "https" in your case if you are using https for your ambari and then try this:

# curl -k -H "X-Requested-By: ambari" -u admin:admin "https://ambari.example.com:8443/api/v1/clusters/cluster-name/hosts?fields=Hosts/ip,Hosts/host_name" -o "/tmp/hosts.json"

.

Or atleast try to open the URL in the browser to see if it is working for you before trying with the Curl command and then once you knwo that the file which you are attaching is of any use or not then you can attach it

https://ambari.example.com:8443/api/v1/clusters/cluster-name/hosts?fields=Hosts/ip,Hosts/host_name

avatar
Explorer

forgot about SSL, my bad...

OK I get output in browser test , here is the file from that.

hosts4.json

avatar
Explorer

will try to send again , seems not to have worked last time.... hosts4 i verified output fist in browser. forgot about the ssl , my bad..hosts4.json

avatar
Explorer

ok I may have to break for the day. I am getting like 10 capcha tests to verify with every post 😞

avatar
Explorer

problem seems to be with this two-hosted DNS domain.....what if instead of using the ambari.example.com we use the corp.example.com all around with other hosts... so change their fqdn to ambari.corp.example.com, cpmpute1.corp.example.com I feel like spinning wheels trying to get it to work wiht short name,

avatar
Master Mentor

@Tom Burke

Are you really checking what kind of command aere you executing in curl and what does every curl argument means?

Before attaching the "hosts4.json" if you would have just checked the content of this file then you would know that the credentials which you are entering in curl command are Wrong ambari admin credential.

# cat hosts4.json 
{
  "status": 403,
  "message": "Unable to sign in. Invalid username/password combination."
}

.

As i do not know your ambari admin credentials hence i just gave you a dummy curl command and expected that you will change the values according to your cluster.

avatar
Explorer

abandoning this effort. was not getting anywhere as I think the ldaps in corp.example.com and machein hostname setup was causing all my issues., it is not a preferred setup anyhow I needed to correct so i renamed all cluster membre with corp....