Support Questions
Find answers, ask questions, and share your expertise

API registration showing double hosts

New Contributor

I am currently using the Cloudera Manager API to automatically register hosts into Cloudera Manager while bootstrapping. However, there is a bug I have encountered where hosts that are registered via the API show up twice, once as a live host and once as a dead host. This issue only occurs for Flume hosts.


Here is a screenshot showing the issue (some sensitive info removed):


Screen Shot 2016-02-09 at 10.50.51 AM.png


Re: API registration showing double hosts

Master Guru
This typically occurs if you end up overwriting the /var/lib/cloudera-scm-agent/uuid file. To resolve the issue, you can delete the duplicated host (if no roles are on it, this is straight forward) or fix the UUID file with the right value and restart the agent (if there are roles on the now-bad host, but none on the new dupe host).

What API calls are you using that reproduces this? Ideally adding a host twice via the API shouldn't work, but perhaps if you can share the reproduction code it will help us analyse the underlying issue further.

Re: API registration showing double hosts

New Contributor

Here is the code we are using to register a host via the API. This is using CDH 5.4.0 and API version 10.


It's worth noting that one API call produces two hosts; it's easy enough to delete the host that shows up as dead, but I was hoping to figure out the root cause here.


Here is the code:


api.create_host(self.host_id, self.host_name, self.host_ip)

We use AWS for our hosting and the host ID is the AWS instance ID. Any ideas?