failed for get of /hbase/hbaseid, code = CONNECTIONLOSS, retries = 1
我正在尝试将Spark应用程序与hbase连接。以下是我给的配置
val conf = HBaseConfiguration.create()
conf.set(“hbase.master”, “localhost:16010”)
conf.setInt(“timeout”, 120000)
conf.set(“hbase.zookeeper.quorum”, “2181”)
val connection = ConnectionFactory.createConnection(conf)
以下是“ jps”详细信息:
5808 ResourceManager
8150 HMaster
8280 HRegionServer
5131 NameNode
8076 HQuorumPeer
5582 SecondaryNameNode
2798 org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
8623 Jps
5951 NodeManager
5279 DataNode
我也尝试过HBase Master 16010
我得到以下错误:
19/09/12 21:49:00 WARN ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
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.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:277)
at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:287)
at org.apache.zookeeper.ClientCnxn
S
e
n
d
T
h
r
e
a
d
.
s
t
a
r
t
C
o
n
n
e
c
t
(
C
l
i
e
n
t
C
n
x
n
.
j
a
v
a
:
1024
)
a
t
o
r
g
.
a
p
a
c
h
e
.
z
o
o
k
e
e
p
e
r
.
C
l
i
e
n
t
C
n
x
n
SendThread.startConnect(ClientCnxn.java:1024) at org.apache.zookeeper.ClientCnxn
SendThread.startConnect(ClientCnxn.java:1024)atorg.apache.zookeeper.ClientCnxnSendThread.run(ClientCnxn.java:1060)
19/09/12 21:49:00 WARN ReadOnlyZKClient: 0x1e3ff233 to 2181:2181 failed for get of /hbase/hbaseid, code = CONNECTIONLOSS, retries = 4
19/09/12 21:49:01 INFO ClientCnxn: Opening socket connection to server 2181/0.0.8.133:2181. Will not attempt to authenticate using SASL (unknown error)
19/09/12 21:49:01 ERROR ClientCnxnSocketNIO: Unable to open socket to 2181/0.0.8.133:2181
似乎加入Zookeeper存在问题。首先检查Zookeeper是否在端口2181上的本地主机上启动。
netstat -tunelp | grep 2181 | grep -i LISTEN
tcp6 0 0 :::2181 ::😗 LISTEN
在conf中的hbase.zookeeper.quorum属性中,您必须传递zookeeper的IP,而不是端口(hbase.zookeeper.property.clientPort)
我的hbase连接器是使用构建的:
val conf = HBaseConfiguration.create()
conf.set("hbase.zookeeper.quorum", "10.80.188.65")
conf.set("hbase.master", "10.80.188.64:60000")
conf.set("hbase.zookeeper.property.clientPort", "2181")
conf.set("zookeeper.znode.parent", "/hbase-unsecure")
val connection = ConnectionFactory.createConnection(conf)
相关文章
- Hbase balance是个啥
- Hbase常用操作
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
- 高可用Hadoop平台-HBase集群搭建
- 用 Arthas 神器来诊断 HBase 异常进程
- WSL(Linux子系统) gedit 报错 failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)
- Hbase 学习(一) hbase配置文件同步
- Hbase 学习(四) hbase客户端设置缓存优化查询
- hbase源码系列(四)数据模型-表定义和列族定义的具体含义
- hbase 跳转过滤器skipfilter
- Installation failed with message INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.datab.cn signatures
- 一脸懵逼学习HBase的搭建(注意HBase的版本)
- HBase和MapReduce框架之TableMapReduceUtil类
- failed for get of /hbase/hbaseid, code = CONNECTIONLOSS, retries = 1
- hbase如何保证数据完整性,丢失数据该如何解决
- HBase选择Store file做compaction的算法
- Hbase常见异常hbase:meta,,1.1588230740 is NOT online; state={1588230740 state=OPEN, ts=162
- 记录 hbase:meta,,1.1588230740 is NOT online; state={1588230740 state=OPEN, ts=162
- Hbase 八股文