How to resolve the error "'nc' not available in my environment."

85 Views Asked by At

I try to run this command to validate if zookeeper service is healthy or not echo ruok | nc localhost 2181

and i got this error in the terminal 'nc' not available in my environment.

what is the solution for this error?

1

There are 1 best solutions below

1
CompEng On BEST ANSWER

You can use this command to connect zookeeper

telnet localhost 2181

Then if you connected you can type ruok and press Enter. Check the response you receive. If ZooKeeper is healthy, it should respond with imok.