2

今天启动hbase的时候遇到一个问题, 错误如下:

1.在 hbase-localhost-zookeeper-chaobin.log

2013-01-02 16:05:26,406 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:3170
2013-01-02 16:05:26,406 INFO org.apache.zookeeper.server.ZooKeeperServer: Refusing session request for client /127.0.0.1:3170 as it has seen zxid 0xc our last zxid is 0x0 client must try another server
2013-01-02 16:05:26,406 INFO org.apache.zookeeper.server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:3170 (no session established for client)
2013-01-02 16:05:27,984 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:3171
2013-01-02 16:05:27,984 INFO org.apache.zookeeper.server.ZooKeeperServer: Refusing session request for client /127.0.0.1:3171 as it has seen zxid 0xc our last zxid is 0x0 client must try another server
2013-01-02 16:05:27,984 INFO org.apache.zookeeper.server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:3171 (no session established for client)
2013-01-02 16:05:29,796 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:3172
2013-01-02 16:05:29,796 INFO org.apache.zookeeper.server.ZooKeeperServer: Refusing session request for client /127.0.0.1:3172 as it has seen zxid 0xc our last zxid is 0x0 client must try another server
2013-01-02 16:05:29,796 INFO org.apache.zookeeper.server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:3172 (no session established for client)
2013-01-02 16:05:31,750 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:3173
2013-01-02 16:05:31,750 INFO org.apache.zookeeper.server.ZooKeeperServer: Refusing session request for client /127.0.0.1:3173 as it has seen zxid 0xc our last zxid is 0x0 client must try another server
2013-01-02 16:05:31,750 INFO org.apache.zookeeper.server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:3173 (no session established for client)

2.在 hbase-localhost-master-chaobin.out

java.io.IOException: Waiting for shutdown of standalone server
    at org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster.shutdown(MiniZooKeeperCluster.java:224)
    at org.apache.hadoop.hbase.master.HMasterCommandLine$LocalHMaster.run(HMasterCommandLine.java:223)
    at java.lang.Thread.run(Thread.java:619)

3.在 hbase-localhost-regionserver-chaobin.log

2013-01-02 16:02:10,375 INFO org.apache.hadoop.hbase.util.VersionInfo: Subversion https://svn.apache.org/repos/asf/hbase/branches/0.94 -r 1332822
2013-01-02 16:02:10,375 INFO org.apache.hadoop.hbase.util.VersionInfo: Compiled by jenkins on Tue May  1 21:43:54 UTC 2012
2013-01-02 16:02:10,531 WARN org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine: Not starting a distinct region server because hbase.cluster.distributed is false
4

1 回答 1

0

从源代码中可以看到,throw 中的waitForServerDown方法会MiniZooKeeperCluster抛出异常。这是因为为指定机器上的 zookeeper 服务器分配的端口被其他应用程序使用,或者它根本无法承载流。尝试将端口更改为其他端口,或检查在该端口上运行的应用程序。

如果您使用的是 linux,请输入netstat -tulp|grep port-no一个替换 zookeeper 端口的终端,以查看它是否被其他程序使用。

于 2013-01-02T09:39:01.003 回答