It happened to me when i tried to clean up and reinstall the Cloudera-manager tot error in web UI "Host is in bad health Cloudera Manager", i checked the log where is found following error:
ERROR Error, CM server guid updated, expected e0c62792-a6a4-4070-b725-3ec1c7265e8e, received 03dfe52e-5beb-4794-8178-f5107739a3d6
This happened due to some leftover files which confuses cloudera agent and CM for this we need to do following
delete this file on all the nodes where ever you have the agent running(It will show in the error message that agent failed on following hosts) and restart the agent service
and try there may be some other reason, so i request you to look into log of agent, server whenever you get error during installation you will surely get the pointer of the probable reason behind the error.