我正在部署一个访问本地HBase表的Tomcat webapp。我正在运行Tomcat 7.0.47和HBase 0.94.6(来自HDP 1.3.2,安装了Ambari)。当我尝试运行webapp时,它在catalina.out中出现zookeeper.znode.parent
不匹配错误:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-111--1, built on 08/20/2013 01:42 GMT
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:host.name=%MYHOSTNAME%
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_31
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/java/jdk1.6.0_31/jre
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/usr/lib/apache-tomcat-7.0.47/bin/bootstrap.jar:/usr/lib/apache-tomcat-7.0.47/bin/tomcat-juli.jar
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/jdk1.6.0_31/jre/lib/amd64/server:/usr/java/jdk1.6.0_31/jre/lib/amd64:/usr/java/jdk1.6.0_31/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/usr/lib/apache-tomcat-7.0.47/temp
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:os.version=2.6.32-358.6.1.el6.x86_64
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:user.name=root
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:user.home=/root
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Client environment:user.dir=/home/%MYUSER%
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
13/11/13 12:06:54 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 2463@%MYHOSTNAME%
13/11/13 12:06:54 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (Unable to locate a login configuration)
13/11/13 12:06:54 INFO zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
13/11/13 12:06:54 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x1424e72bdee003b, negotiated timeout = 40000
13/11/13 12:06:54 ERROR client.HConnectionManager$HConnectionImplementation: Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
13/11/13 12:06:54 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x1424e72bdee003b
13/11/13 12:06:54 INFO zookeeper.ClientCnxn: EventThread shut down
13/11/13 12:06:54 INFO zookeeper.ZooKeeper: Session: 0x1424e72bdee003b closed
我已经检查过我的hbase-site.xml具有zookeeper.znode.parent
(/ hbase-unsecure)的正确值,并且我的webapp的hbase-site.xml文件与之匹配。 HBase在它自己的工作正常,我能够创建表并加载数据。所以我不确定错配发生在哪里。我能想到的另一件事是zookeeper.jar是用不同的zookeeper.znode.parent定义编译的。