今晚在实验室环境下把hbase0.20.5装好了,按照网上各种指导一步步操作是没问题的,关键是部署好之后启动,执行 hbase shell和list没响应。。。。
查看其中一个HRegionServer的日志,发现以下错误:
2010-10-13 16:13:16,661 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp 2010-10-13 16:13:16,661 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.compiler= 2010-10-13 16:13:16,661 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.name=Linux 2010-10-13 16:13:16,661 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.arch=i386 2010-10-13 16:13:16,661 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.version=2.6.28 2010-10-13 16:13:16,661 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.name=maohong 2010-10-13 16:13:16,661 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.home=/home/maohong 2010-10-13 16:13:16,662 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.dir=/home/maohong/hadoopcluster/hbase-0.20.6 2010-10-13 16:13:16,663 INFO org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=node205:2181,node202:2181,node201: 2181,node236:2181,node206:2181 sessionTimeout=60000 watcher=org.apache.hadoop.hbase.regionserver.HRegionServer@15db314 2010-10-13 16:13:16,665 INFO org.apache.zookeeper.ClientCnxn: zookeeper.disableAutoWatchReset is false 2010-10-13 16:13:16,680 INFO org.apache.zookeeper.ClientCnxn: Attempting connection to server node206/192.168.5.206:2181 2010-10-13 16:13:16,684 WARN org.apache.zookeeper.ClientCnxn: Exception closing session 0x0 to sun.nio.ch.SelectionKeyImpl@609959 java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:933) 2010-10-13 16:13:16,685 WARN org.apache.zookeeper.ClientCnxn: Ignoring exception during shutdown input java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:638) at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:360) at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:999) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:970) 2010-10-13 16:13:16,685 WARN org.apache.zookeeper.ClientCnxn: Ignoring exception during shutdown output java.nio.channels.ClosedChannelException |
后来,发现主节点的/etc/hosts文件里有127.0.1.1 node236这一行,注释掉之后就好了。
其原因,我想,应该是因为master的服务绑定在127.0.1.1:60000上了,而不是192.168.5.236:60000,导致slave节点无法访问到master。
所以,在配置分布式系统的时候,一定要注意各个机器之间配置的统一性,包括主机名(/etc/hosts文件)、用户名、Hadoop/Hbase各种配置文件等,对于不一致的情况,一定要特别仔细的检查,然后统一起来。
阅读(4071) | 评论(0) | 转发(0) |