Hadoop 在HBase上运行MapReduce会导致Zookeeper错误

Hadoop 在HBase上运行MapReduce会导致Zookeeper错误,hadoop,mapreduce,hbase,apache-zookeeper,Hadoop,Mapreduce,Hbase,Apache Zookeeper,我正在用Hadoop和HBase做一个测试项目。目前该集群有2个Ubuntu虚拟机,托管在Windows计算机上 我能够使用以下HBase Java API配置远程执行PUT、查询和删除操作(在我的主机上) config = HBaseConfiguration.create(); config.set("hbase.zookeeper.quorum", "192.168.56.90"); config.set("hbase.zookeeper.property.clientPort", "

我正在用Hadoop和HBase做一个测试项目。目前该集群有2个Ubuntu虚拟机,托管在Windows计算机上

我能够使用以下HBase Java API配置远程执行PUT、查询和删除操作(在我的主机上)

config = HBaseConfiguration.create();
config.set("hbase.zookeeper.quorum", "192.168.56.90");  
config.set("hbase.zookeeper.property.clientPort", "2222");
当我尝试在Windows上使用与上面相同的配置运行HBase MapReduce作业时,出现以下错误

    13/03/24 06:11:03 ERROR security.UserGroupInformation: PriviledgedActionException as:Joel cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Joel\mapred\staging\Joel290889388\.staging to 0700
java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Joel\mapred\staging\Joel290889388\.staging to 0700 
从我在网上看到的情况来看,在Windows上运行MapReduce作业似乎有问题。因此,我尝试使用“java-jar MR.jar”在Linux上运行MapReduce作业

在Linux上,我无法连接到Zookeeper。由于未知原因,Zookeeper主机和端口正在客户端重置

13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:os.version=3.5.0-23-generic
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:user.name=hduser
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/hduser
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:user.dir=/home/hduser/testes
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.56.90:2222 sessionTimeout=180000 watcher=hconnection
13/03/24 05:59:33 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 11552@node01
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Opening socket connection to server node01/192.168.56.90:2222. Will not attempt to authenticate using SASL (unknown error)
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Socket connection established to node01/192.168.56.90:2222, initiating session
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Session establishment complete on server node01/192.168.56.90:2222, sessionid = 0x13d9afaa1a30006, negotiated timeout = 180000
13/03/24 05:59:33 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x13d9afaa1a30006
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Session: 0x13d9afaa1a30006 closed
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: EventThread shut down
13/03/24 05:59:33 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
13/03/24 05:59:33 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
13/03/24 05:59:33 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 11552@node01
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
13/03/24 05:59:33 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
从上面的日志判断,它正确连接到node01:2222(node01解析为192.168.56.90)。但由于某些原因,它更改为localhost:2181,然后给出一个连接拒绝错误

如何解决这个问题,使MR jobs在Linux上运行,与Zookeeper在同一台机器上运行

版本:Hbase 0.94.5/Hadoop 1.1.2


谢谢。

您可能还需要设置hbase.master

还要检查/etc/hosts文件,看看它是否正确。您是否能够使用该连接信息远程登录到zookeeper

config.set("hbase.zookeeper.quorum", "192.168.56.90");  
config.set("hbase.zookeeper.property.clientPort", "2222");
config.set("hbase.master", "some.host.com:60000")

您可能还需要设置hbase.master

还要检查/etc/hosts文件,看看它是否正确。您是否能够使用该连接信息远程登录到zookeeper

config.set("hbase.zookeeper.quorum", "192.168.56.90");  
config.set("hbase.zookeeper.property.clientPort", "2222");
config.set("hbase.master", "some.host.com:60000")