Hbase zkcli command execution error

After performing hbase zkcli given the information as follows:

15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/opt/cloudera/parcels/CDH-5.4.5-1.cdh5.4.5.p0.7/lib/hadoop/lib/native
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:os.version=3.16.0-4-amd64
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:user.name=root
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:user.home=/root
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Client environment:user.dir=/root
15/10/02 15:17:55 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=l11-n6.gnx.lable.nl:2181,l12-n6.gnx.lable.nl:2181,l10-n6.gnx.lable.nl:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@57aabb39
Welcome to ZooKeeper!
15/10/02 15:17:55 INFO zookeeper.ClientCnxn: Opening socket connection to server l10-n6.gnx.lable.nl/10.255.10.6:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
15/10/02 15:17:55 INFO zookeeper.ClientCnxn: Socket connection established, initiating session, client: /10.255.14.4:35889, server: l10-n6.gnx.lable.nl/10.255.10.6:2181
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
at jline.TerminalFactory.create(TerminalFactory.java:101)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:227)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:219)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:207)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:311)
at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:282)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperMainServer.main(ZooKeeperMainServer.java:136)


JLine support is disabled
15/10/02 15:17:55 INFO zookeeper.ClientCnxn: Session establishment complete on server l10-n6.gnx.lable.nl/10.255.10.6:2181, sessionid = 0x34fffc20a1b3a56, negotiated timeout = 30000


WATCHER::


WatchedEvent state:SyncConnected type:None path:null

--------------------------------------------------------------------------------------

Solution:

vim bin / hbase file, add the following information in red section:

elif [ "$COMMAND" = "zkcli" ] ; then
  CLASS="org.apache.hadoop.hbase.zookeeper.ZooKeeperMainServer"
  CLASSPATH=`echo $CLASSPATH | sed 's/jruby-cloudera-1\.0\.0\.jar//g'`

After the restart hbase pseudo-distributed environment, then re-enter the customer zk end not being given, normally enter:

 

 

The official jire:

https://issues.apache.org/jira/browse/ZOOKEEPER-1718

CDH version issus:

https://issues.cloudera.org/browse/DISTRO-758
---------------------
Author: shallow Xi Wang
Source: CSDN
Original: https: // blog.csdn.net/qq_32252917/article/details/78389638
Disclaimer: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/zhengbing/p/11125944.html