无法从 Hbase java api 客户端访问 Hbase 节点

发布于 2025-01-08 05:17:32 字数 344 浏览 2 评论 0原文

我正在尝试使用 java api 连接到 hbase 集群。 在尝试连接到集群节点之后,API 正在连接到 Zookeeper。但这次失败并出现以下错误:

INFO ipc.HBaseRPC: Server at <server-name>/<ip>:60020 could not be reached after 1 tries, giving up.

节点中的端口已打开,因为 hbase 默认打开。 我使用 hbase 的默认设置。 该节点设置为区域服务器。 我尝试使用 hbase 的独立配置,并且正在工作,区别在于 api 在 Zookeeper 之后连接的端口不一样。

I'm trying to connect to an hbase cluster using the java api.
The api is connecting to the zookeeper after that is trying to connect to a cluster node. But this time fails with this error:

INFO ipc.HBaseRPC: Server at <server-name>/<ip>:60020 could not be reached after 1 tries, giving up.

The port in the node is open because is default open by the hbase.
I'm using the default settings for hbase.
The node is set as regional server.
I've try using the standalone configuration for hbase and is working the difference is the port that the api is connecting after zookeeper which is not the same.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

潜移默化 2025-01-15 05:17:32

当我使用cloudera Manager配置集群时,我遇到了同样的问题。

解决方案是:从 /etc/hosts 文件中删除 127.0.0.1 条目。

I had the same problem when I configured the cluser using cloudera Manager.

The solution is: remove the 127.0.0.1 entry from the /etc/hosts file.

梦亿 2025-01-15 05:17:32

如果您要连接到远程 HBase 集群 - 请确保将全部集群主机名和 IP 添加到本地主机文件(Linux 上的 /etc/hosts 或 C:\Windows\System32\drivers\etc Windows 上的 \hosts),如下例所示:

192.168.150.101 vm01.domain.com

192.168.150.102 vm02.domain.com

192.168.150.103 vm03.domain.com

192.168.150.104 vm04.domain.com

显然,Zookeper 在尝试连接到 HBase 时使用主机名而不是 IP,这在使用 Java 远程连接时可能会出现问题。

希望有帮助!

If you are connecting to a remote HBase cluster - make sure to add all of cluster hostnames and ip's to your local hosts file (/etc/hosts on Linux or C:\Windows\System32\drivers\etc\hosts on Windows), like in the following example:

192.168.150.101 vm01.domain.com

192.168.150.102 vm02.domain.com

192.168.150.103 vm03.domain.com

192.168.150.104 vm04.domain.com

Apparently Zookeper uses hostname instead of ip somewhere when trying to connect to HBase and it can be a problem when connecting remotely with Java.

Hope it helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文