在主节点上:Regionserver:java.net.BindException构造失败

时间:2015-03-05 02:52:45

标签: java hadoop hbase

我有一个4节点集群(hadoop 2.5.2)(Hbase 1.0.0),主机(作为salve)和主机上有3个从机。在调用start-hbase.sh之后,jps没有显示在主服务器上运行的HRegionServer进程,但是在所有三个从服务器上都没有运行。

主服务器上的日志文件显示:

java.lang.RuntimeException: Failed construction of Regionserver: class     org.apache.hadoop.hbase.regionserver.HRegionServer
at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2487)
at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:64)
at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:87)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:2502)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2485)
... 5 more
Caused by: java.net.BindException: Problem binding to hadoopmaster.mst.edu/172.16.195.58:16020 : Address already in use
at org.apache.hadoop.hbase.ipc.RpcServer.bind(RpcServer.java:2371)
at org.apache.hadoop.hbase.ipc.RpcServer$Listener.<init>(RpcServer.java:524)
at org.apache.hadoop.hbase.ipc.RpcServer.<init>(RpcServer.java:1899)
at org.apache.hadoop.hbase.regionserver.RSRpcServices.<init>(RSRpcServices.java:790)
at org.apache.hadoop.hbase.regionserver.HRegionServer.createRpcServices(HRegionServer.java:575)
at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:492)
... 10 more
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.hadoop.hbase.ipc.RpcServer.bind(RpcServer.java:2369)
... 15 more

1 个答案:

答案 0 :(得分:0)

这与HBase 1.0.x中的许多问题有关:HBASE-11575HBASE-13453HBASE-13479

this comment on HBASE-13479中提到的解决方法是在hbase-site.xml中手动配置以下端口:

  • hbase.regionserver.port
  • hbase.master.info.port
  • hbase.regionserver.info.port

升级到HBase 1.1.x是另一种选择(对我有用)。