问题描述
我探索了一些设置kafka的选项,我知道Zookeeper必须启动并启动一个kafka。
我想知道如何才能我找到了下面的内容。
$ b 我的zookeeper实例的主机名和端口号---我检查了zoo.cfg,我只能找到ClientPort而不是主机名, hostname是我盒子的主机名?
2)检查ZooKeeper是否启动并正在运行---我试图做一个 ps - ef | grepzoo
我找不到任何东西。可能是我用了一个错误的关键字来搜索?
任何帮助都会真正被赞赏?
检查Zookeeper是否可访问。一种方法是简单地telnet到正确的端口并执行stats命令。
root @ host:〜#telnet localhost 2181
Trying 127.0.0.1 ...
连接到为myhost。
转义字符是'^]'。
stats
Zookeeper版本:3.4.3-cdh4.0.1--1,基于06/28/2012 23:59 GMT
客户:
延迟分钟/ avg / max:0/0/677
已收到:4684478
已发送:4687034
杰出:0
Zxid:0xb00187dd0
模式:领导者
节点计数:127182
由外部主机关闭的连接。
I exploring a few options to setup kafka and I knew that the Zookeeper has to be up and running to initiate a kafka.
I would like to know how can I find the below.
1) hostname and port for my zookeeper instance---I checked the zoo.cfg and I could only find the ClientPort not the hostname, will hostname be the hostname of my box??
2) To check if ZooKeeper is up and running---I tried to do a ps -ef | grep "zoo"
I could not find anything. May be I am using a wrong key word to search??
Any help would be really appreciated?
To check if Zookeeper is accessible. One method is to simply telnet to the proper port and execute the stats command.
root@host:~# telnet localhost 2181
Trying 127.0.0.1...
Connected to myhost.
Escape character is '^]'.
stats
Zookeeper version: 3.4.3-cdh4.0.1--1, built on 06/28/2012 23:59 GMT
Clients:
Latency min/avg/max: 0/0/677
Received: 4684478
Sent: 4687034
Outstanding: 0
Zxid: 0xb00187dd0
Mode: leader
Node count: 127182
Connection closed by foreign host.
这篇关于如何检查ZooKeeper是否在命令提示符下运行或启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!