- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hostname related exception on adding new host
- Labels:
-
Apache Ambari
Created ‎05-04-2016 04:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a development cluster with 4 nodes. One of the nodes, Machine1 (CentOS), was shut down unexpectedly, due to which the Amabri Dashboard, started showing "Heatbeat lost" for all the services for this Node. I had posted a thread to understand this issue, but none of the suggestions mentioned in that thread helped me fix the issue. Therefore, I deleted the host and tried to add the host back into the cluster. I had run the python cleanup code on Machine1 after I deleted this Node from the cluster through Ambari Dashboard. Now, when I add the host I am getting a weird error, which I don't understand.
7,349 main.py:143 - Ambari agent machine hostname (Machine1\xc2\xa0) does not match expected ambari server hostname (Machine1). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly ERROR 2016-05-04
09:52:47,350 main.py:309 - Fatal exception occurred:
I have checked the host file under /etc folder in Machine1 and found that the FQN for Machine1 is correct. I do not understand what does "xc2\xa0" mean here and from where is the setup picking up these two texts? Also note that the Ambari Server is hosted on Machine2, so the error "does not match expected ambari server hostname (Machine1)" also sounds confusing. I am stuck and I need some help here.
Created ‎05-04-2016 06:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the issue and fixed. The command "hostname -f" on Machine1 was giving "hostname: Unknown host" error. I fixed that error and then when I added the host again, it was successful.
Created ‎05-04-2016 05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check which hosts are registerd with Ambari, from Ambari server run
curl -u admin:admin http://localhost:8080/api/v1/clusters/CLUSTER_NAME/hosts
My guess is that your Machine1 is there, registered as "machine1" (all lower-case letters). Then, try adding a new host "machine1". By the way, it's the best to avoid using capitals in host names.
Created ‎05-04-2016 06:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the issue and fixed. The command "hostname -f" on Machine1 was giving "hostname: Unknown host" error. I fixed that error and then when I added the host again, it was successful.
