无法解决Kubernetes服务的地址

发布于 2025-01-24 04:50:44 字数 2241 浏览 2 评论 0原文

我已经安装了kafka 单节点使用 confluent kafka pod中存在错误:

[WARN] 2022-04-26 14:29:47,008 [main-SendThread(zookeeper.confluent.svc.cluster.local:2181)] org.apache.zookeeper.ClientCnxn run - Session 0x0 for sever zookeeper.confluent.svc.cluster.local:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.lang.IllegalArgumentException: Unable to canonicalize address zookeeper.confluent.svc.cluster.local:2181 because it's not resolvable
        at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:78)
        at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:41)
        at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1161)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1210)
[INFO] 2022-04-26 14:29:47,273 [main] kafka.zookeeper.ZooKeeperClient info - [ZooKeeperClient Kafka server] Closing.
[ERROR] 2022-04-26 14:29:48,112 [main-SendThread(zookeeper.confluent.svc.cluster.local:2181)] org.apache.zookeeper.client.StaticHostProvider resolve - Unable to resolve address: zookeeper.confluent.svc.cluster.local:2181
java.net.UnknownHostException: zookeeper.confluent.svc.cluster.local

错误消息:

Unable to canonicalize address zookeeper.confluent.svc.cluster.local:2181 because it's not resolvable
Unable to resolve address: zookeeper.confluent.svc.cluster.local:2181

我检查了我的zookeper ...它很好,而且没有问题。另外,使用dnsutils检查DNS:

$ kubectl -n default exec -it dnsutils -- nslookup zookeeper.confluent.svc.cluster.local

Server:         10.96.0.10
Address:        10.96.0.10#53

Name:   zookeeper.confluent.svc.cluster.local
Address: 192.168.0.111

我该怎么办?这是与K8相关的问题吗?

I have installed Kafka single-node using Confluent. There is an error in Kafka pod :

[WARN] 2022-04-26 14:29:47,008 [main-SendThread(zookeeper.confluent.svc.cluster.local:2181)] org.apache.zookeeper.ClientCnxn run - Session 0x0 for sever zookeeper.confluent.svc.cluster.local:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.lang.IllegalArgumentException: Unable to canonicalize address zookeeper.confluent.svc.cluster.local:2181 because it's not resolvable
        at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:78)
        at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:41)
        at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1161)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1210)
[INFO] 2022-04-26 14:29:47,273 [main] kafka.zookeeper.ZooKeeperClient info - [ZooKeeperClient Kafka server] Closing.
[ERROR] 2022-04-26 14:29:48,112 [main-SendThread(zookeeper.confluent.svc.cluster.local:2181)] org.apache.zookeeper.client.StaticHostProvider resolve - Unable to resolve address: zookeeper.confluent.svc.cluster.local:2181
java.net.UnknownHostException: zookeeper.confluent.svc.cluster.local

Error messages :

Unable to canonicalize address zookeeper.confluent.svc.cluster.local:2181 because it's not resolvable
Unable to resolve address: zookeeper.confluent.svc.cluster.local:2181

I checked my zookeper ... it's good and works without a problem. Also, check DNS using dnsutils :

$ kubectl -n default exec -it dnsutils -- nslookup zookeeper.confluent.svc.cluster.local

Server:         10.96.0.10
Address:        10.96.0.10#53

Name:   zookeeper.confluent.svc.cluster.local
Address: 192.168.0.111

What can I do? Is this a k8s related problem?

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

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

发布评论

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

评论(1

箹锭⒈辈孓 2025-01-31 04:50:44

这发生在我身上,但是在Docker-Compose项目上,

最终,我发现服务器上没有剩下的空间会引起此问题。
清洁一些空间,然后奏效。

This happens with me, but on docker-compose project

finally, I found that no space left on server causes this issue.
clean some spaces and it worked.

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