failed for get of /hbase/hbaseid, code = CONNECTIONLOSS, retries = 1

2023-11-11

我正在尝试将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 ::

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

failed for get of /hbase/hbaseid, code = CONNECTIONLOSS, retries = 1 的相关文章

随机推荐