Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Who agreed with this solution

avatar
Expert Contributor

Duplicate hosts are usually caused when the /var/lib/cloudera-scm-agent/uuid file has been edited or removed.

To fix this issue you can try the following example:
Let’s say:
HostA is the original/correct host with Roles on it.
HostB is the new duplicate/incorrect host.
From the Cloudera Manager UI navigate to the Host page (CM -> Hosts -> “All Hosts”)

 

1. Identify original UUID
Click on HostA -> Under “Details” record the “Host ID”. This is the UUID. Let’s call it “HostA-UUID” (it usually is a long alpha numeric number).

 

2. login to the Host from command line and navigate to var/lib/cloudera-scm-agent/

 

3. Stop the agent
service cloudera-scm-agent stop

 

4. Make a backup of the existing uuid file.

 

5. Change the contents of the uuid file with the original uuid (i.e HostA-UUID from step 1)
echo -n “HostA-UUID” > /var/lib/cloudera-scm-agent/uuid

For example:
In my local env my UUID/Host ID is f7b2231c-dbd0-47ff-bf09-7961080cc065:
echo –n “f7b2231c-dbd0-47ff-bf09-7961080cc065” > /var/lib/cloudera-scm-agent/uuid

 

6. Make sure you have not introduced a carriage return by running cat on the uuif file:
cat uuid
(your command line prompt should be on the same line as the restored uuid.
For example:
[mytestenv] cat uuid

f7b2231c-dbd0-47ff-bf09-7961080cc065[mytestenv]

 

7. Start the Agent:
service cloudera-scm-agent

 

8. From the Host page in Cloudera manager, check box HostB (the bad duplicate host with no roles) -> select the “Actions for Selected” drop down -> Delete

 

View solution in original post

Who agreed with this solution