我的HBASE 集群的节点上有两个网卡,一个是集群内部使用的网卡,一个用来和外网传输数据。
但是部署安装完成后 hbase regionserver 启动后60020端口一直绑定内网网卡,这就导致外网无法访问hbase 集群;
DEBUG的出错信息:
2014-06-10 16:11:47.230-[main-DEBUG]org.apache.hadoop.ipc.RpcClient:Connecting to xxxxxxxxxxxxxxxx-yarn12/192.169.2.34:60020
2014-06-10 16:11:48.136-[main-DEBUG]org.apache.hadoop.ipc.RpcClient:IPC Client (29569230) connection to xxxxxxxxxxxxxxxx-yarn12/192.169.2.34:60020: Connection refused: no further information
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.

在HBASE集群环境中,遇到RegionServer启动后只绑定内网网卡,导致外网无法访问的问题。错误日志显示连接拒绝。通过分析源码发现HRegionServer构造函数中会根据主机名解析第一个IP进行绑定。解决方案是在hbase-site.xml配置'hbase.regionserver.ipc.address'为0.0.0.0,重启RegionServer后,确认端口正确绑定。
最低0.47元/天 解锁文章
1153

被折叠的 条评论
为什么被折叠?



