Created on 02-05-2019 10:28 PM - edited 09-16-2022 07:07 AM
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
Created 02-06-2019 02:59 AM
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.
Created 02-06-2019 01:03 AM
Hi Jay, thansk for help , uncertain what asked last , want this output again? attached.hosts-2.json
Created 02-06-2019 01:08 AM
attached file is corrupted.
Created 02-06-2019 01:13 AM
another host3.json
Created 02-06-2019 01:16 AM
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
Created 02-06-2019 01:24 AM
Created 02-06-2019 01:35 AM
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
Created 02-06-2019 01:37 AM
ok I may have to break for the day. I am getting like 10 capcha tests to verify with every post 😞
Created 02-06-2019 02:53 AM
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,
Created 02-06-2019 02:59 AM
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.
Created 02-06-2019 03:06 AM
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....