HRegionServer显示“告诉主人我们错了”。显示套接字异常:参数无效

时间:2017-04-22 09:22:35

标签: apache hadoop hbase centos7 bigdata

我试图在3台机器上创建一个hbase集群。 Hadoop(v - 2.8.0)启动并运行在顶部我配置了HBase(v - 1.2.5).Hbase启动很好它启动了HMaster和Region服务器,但它仍显示区域服务器和HMaster日志中的后续错误它显示没有签入区域服务器。

2017-04-20 19:30:33,950 WARN  [regionserver/localhost/127.0.0.1:16020] regionserver.HRegionServer: error telling master we are up
com.google.protobuf.ServiceException: java.net.SocketException: Invalid argument
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:240)
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:336)
        at org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos$RegionServerStatusService$BlockingStub.regionServerStartup(RegionServerStatusProtos.java:8982)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.reportForDuty(HRegionServer.java:2316)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:907)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Invalid argument
        at sun.nio.ch.Net.connect0(Native Method)
        at sun.nio.ch.Net.connect(Net.java:454)
        at sun.nio.ch.Net.connect(Net.java:446)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.setupConnection(RpcClientImpl.java:416)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.setupIOstreams(RpcClientImpl.java:722)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.writeRequest(RpcClientImpl.java:906)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.tracedWriteRequest(RpcClientImpl.java:873)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1241)
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:227)

我的主节点的JPS

[hadoop@localhost bin]$ jps
20624 SecondaryNameNode
20800 ResourceManager
20401 NameNode
18061 Jps
17839 HMaster

myregion节点的JPS

[hadoop@localhost bin]$ jps    
11168 Jps
482 DataNode
10840 HQuorumPeer
10974 HRegionServer

所有节点的hbase-site.xml

<configuration>
<property>
        <name>hbase.master.hostname</name>
        <value>NameNode</value>
</property>
<property>
        <name>hbase.rootdir</name>
        <value>hdfs://NameNode:8020/hbase</value>
</property>
<property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
</property>
<property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>hdfs://NameNode:8020/zookeeper</value>
</property>
<property>
        <name>hbase.zookeeper.quorum</name>
        <value>DataNode1,DataNode2</value>
</property>
<property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2181</value>
</property>
</configuration>

regionservers文件包含

DataNode1
DataNode2
所有节点中的

etc / hosts文件包含实际的ips而不是loopback ips

192.168.00.00 NameNode
192.168.00.00 DataNode1
192.168.00.00 DataNode2

注意配置在所有节点中都是相同的。任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:1)

我在所有区域服务器中放置了以下属性hbase-site.xml解决了我的问题。<property> <name>hbase.regionserver.hostname</name> <value>DataNode1</value> </property> <property> <name>hbase.regionserver.port</name> <value>16020</value> </property>

答案 1 :(得分:1)

我遇到了同样的问题,但是...
更改主机名解决了我的问题
sudo hostnamectl set-hostname new_hostname
我有一个 master 和一个名为 node1
的节点 link to wiki that have the configs