如何解决错误 “在我的环境中找不到 ‘nc’。”

huangapple go评论118阅读模式
英文:

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

问题

'nc' 在我的环境中不可用。
这个错误的解决方法是安装 'nc' 工具或使用其他替代工具来执行该命令。

英文:

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

得分: 0

你可以使用以下命令连接到Zookeeper:

telnet localhost 2181

然后,如果连接成功,可以输入 ruok 并按回车键。
检查你收到的响应。如果ZooKeeper健康,它应该会回复 imok

英文:

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.

huangapple
  • 本文由 发表于 2023年7月10日 21:33:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76654274.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定