其他分享
首页 > 其他分享> > zookeeper可视化WEB工具(zkui)搭建与配置

zookeeper可视化WEB工具(zkui)搭建与配置

作者:互联网

  https://www.cnblogs.com/caoshousong/p/10709371.html

前提:zookeeper 可视化WEB工具zkui依赖java环境,因此需要安装jdk,同时zkui源码要Maven编译,需要安装apache-maven.

JDK下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Apache-maven下载地址:https://maven.apache.org/download.cgi

1.登录zkui ,选择导航“Host” 出现错误提示:KeeperErrorCode = NoNode for /appconfig/hosts  如下所示:

 

2.日志错误信息如下:

3. 

查询了该项目的Github https://github.com/DeemOpen/zkui/issues/61 并未找到解决方法;根据提示:根目录下无节点/appconfig/hosts,既然根目录下无/appconfig/hosts节点,那就手动创建;

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

[root@localhost App]# sh /App/zookeeper/bin/zkCli.sh -server 192.168.31.43:2181

Connecting to 192.168.31.43:2181

2019-04-15 11:04:27,148 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.14-4c25d480e66aadd371de8bd2fd8da255ac140bcf, built on 03/06/2019 16:18 GMT

2019-04-15 11:04:27,151 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=localhost

2019-04-15 11:04:27,151 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_102

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/App/java/jdk1.8.0_102/jre

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/App/zookeeper/bin/../zookeeper-server/target/classes:/App/zookeeper/bin/../build/classes:/App/zookeeper/bin/../zookeeper-server/target/lib/*.jar:/App/zookeeper/bin/../build/lib/*.jar:/App/zookeeper/bin/../lib/slf4j-log4j12-1.7.25.jar:/App/zookeeper/bin/../lib/slf4j-api-1.7.25.jar:/App/zookeeper/bin/../lib/netty-3.10.6.Final.jar:/App/zookeeper/bin/../lib/log4j-1.2.17.jar:/App/zookeeper/bin/../lib/jline-0.9.94.jar:/App/zookeeper/bin/../lib/audience-annotations-0.5.0.jar:/App/zookeeper/bin/../zookeeper-3.4.14.jar:/App/zookeeper/bin/../zookeeper-server/src/main/resources/lib/*.jar:/App/zookeeper/bin/../conf:.:/App/java/jdk1.8.0_102/lib/dt.jar:/App/java/jdk1.8.0_102/lib/tools.jar

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=:/usr/local/apr/lib:/usr/local/apr/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Linux

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=3.10.0-693.el7.x86_64

2019-04-15 11:04:27,153 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=root

2019-04-15 11:04:27,154 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=/root

2019-04-15 11:04:27,154 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=/App

2019-04-15 11:04:27,159 [myid:] - INFO  [main:ZooKeeper@442] - Initiating client connection, connectString=192.168.31.43:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@67424e82

Welcome to ZooKeeper!

JLine support is enabled

2019-04-15 11:04:27,220 [myid:] - INFO  [main-SendThread(192.168.31.43:2181):ClientCnxn$SendThread@1025] - Opening socket connection to server 192.168.31.43/192.168.31.43:2181. Will not attempt to authenticate using SASL (unknown error)

2019-04-15 11:04:27,300 [myid:] - INFO  [main-SendThread(192.168.31.43:2181):ClientCnxn$SendThread@879] - Socket connection established to 192.168.31.43/192.168.31.43:2181, initiating session

2019-04-15 11:04:27,314 [myid:] - INFO  [main-SendThread(192.168.31.43:2181):ClientCnxn$SendThread@1299] - Session establishment complete on server 192.168.31.43/192.168.31.43:2181, sessionid = 0x1000001f2a00008, negotiated timeout = 30000

 

WATCHER::

 

WatchedEvent state:SyncConnected type:None path:null

[zk: 192.168.31.43:2181(CONNECTED) 0] ls /

[zookeeper]

[zk: 192.168.31.43:2181(CONNECTED) 1] create /appconfig "my appconfig"

Created /appconfig

[zk: 192.168.31.43:2181(CONNECTED) 2] create /appconfig/hosts 192.168.31.43

Created /appconfig/hosts

[zk: 192.168.31.43:2181(CONNECTED) 3] ls /

[appconfig, zookeeper]

再次刷新、登录发现正常:

标签:11,WEB,27,04,zookeeper,zkui,2019,main
来源: https://blog.csdn.net/sl1990129/article/details/104672659