日期:2014-05-16  浏览次数:20502 次

HBase 配置的小问题

前几天把集群关闭了,换了一个新的版本。然后就发现集群再也起不来了。

依照以前的步骤一步一步下来。启动集群的时候出现了很奇怪的事情:

master起不来,regionserver倒是启动了。

?

查看master日志.

metrics.MasterMetrics: Initialized
2011-11-02 19:03:51,914 INFO org.apache.hadoop.hbase.master.ActiveMasterManager: Master=mastername:60000
2011-11-02 19:03:52,098 FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.
java.io.IOException: Call to namenodename:9000 failed on local exception: java.io.EOFException

? at org.apache.hadoop.ipc.Client.wrapException(Client.java:775)
??????? at org.apache.hadoop.ipc.Client.call(Client.java:743)
??????? at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
??????? at $Proxy5.getProtocolVersion(Unknown Source)
??????? at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:359)
??????? at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113)
??????? at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:215)
??????? at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:177)
??????? at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)
??????? at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)
??????? at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
??????? at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)
??????? at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:196)
??????? at org.apache.hadoop.fs.Path.getFileSystem(Path.java:175)
??????? at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:344)
??????? at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:81)
??????? at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:347)
??????? at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:283)
Caused by: java.io.EOFException
??????? at java.io.DataInputStream.readInt(DataInputStream.java:375)
??????? at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:501)
??????? at org.apache.hadoop.ipc.Client$Connection.run(Client.java:446)
2011-11-02 19:03:52,101 INFO org.apache.hadoop.hbase.master.HMaster: Aborting
2011-11-02 19:03:52,101 DEBUG org.apache.hadoop.hbase.master.HMaster: Stopping service threads
2011-11-02 19:03:52,101 INFO org.apache.hadoop.ipc.HBaseServer: Stopping server on 60000
2011-11-02 19:03:52,101 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 60000: exiting

2011-11-02 19:03:52,101 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 0 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 8 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 2 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 14 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: Stopping IPC Server listener on 60000
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 18 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 19 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 20 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 22 on 60000: exiting
2011-11-02 19:03:52,102 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 21 on 60000: exiting

?

红色的mastername指的是master的主机名

红色的namenodename指的是hdfs的namenode的主机名

?

出现这种问题主要原因是hbase中的hadoop-core的jar和hadoop的不兼容,导致连不上hdfs。

故用hadoop的hadoop-core.jar文件替换hbase的hadoop-core.ja