[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]
|