zookeeper_ An error is reported when the exporter starts

Problem Description: two machines, one zookeeper_ Data can be found when the exporter is started normally, and the other one can be started normally, and then no data can be detected.

note: check through Prometheus ZK_ The exporter is alive, but the data of the machine reporting an error cannot be found

Error log: erro [0014] unable to open connection to zookeeper error = “dial TCP: lookup localhost on no such host”


It’s a DNS problem, so check the/etc/resolv.conf file of the machine that reports an error and compare it with the file of the machine that does not report an error. If it is found that there is an inconsistency, change it to the constant one, and then solve the problem

Log in to Prometheus to view ZK_ Up data

Then the problem is solved

Read More: