本文主要是介绍Will not attempt to authenticate using SASL (unknown error) (org,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
由于kafka运行是通过docker镜像的方式运行的,而且zookeeper外部的客户端也可以连接上zookeeper就排除了,zookeeper的异常情况,那么剩下的只可能是kafka运行的命令出问题了,我之前的运行命令如下:
docker run -dit --restart=always --log-driver json-file --log-opt max-size=100m --log-opt max-file=2 --name kafka \
-p 9092:9092 \
-e KAFKA_BROKER_ID=0 \
-e KAFKA_ZOOKEEPER_CONNECT=106.14.132.94:2181 \
-e KAFKA_ADVERTISED_HOST_NAME=106.14.132.94 \
-e KAFKA_ADVERTISED_PORT=9092 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://106.14.132.94:9092 \
-e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 \
-v /etc/localtime:/etc/localtime \
-t wurstmeister/kafka
把监听的0.0.0.0改成服务器ip地址
docker run -dit --restart=always --log-driver json-file --log-opt max-size=100m --log-opt max-file=2 --name kafka \
-p 9092:9092 \
-e KAFKA_BROKER_ID=0 \
-e KAFKA_ZOOKEEPER_CONNECT=106.14.132.94:2181 \
-e KAFKA_ADVERTISED_HOST_NAME=106.14.132.94 \
-e KAFKA_ADVERTISED_PORT=9092 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://106.14.132.94:9092 \
-e KAFKA_LISTENERS=PLAINTEXT://106.14.132.94:9092 \
-v /etc/localtime:/etc/localtime \
-t wurstmeister/kafka
但是还是有出错的情况:
Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
Host is unreachable (org.apache.zookeeper.ClientCnxn)
[2021-11-16 15:20:11,821] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Clien 《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》无偿开源 威信搜索公众号【编程进阶路】 t environment:java.compiler= (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:os.version=5.10.60-9.al8.x86_64 (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:user.name=root (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:user.home=/root (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:user.dir=/ (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:os.memory.free=973MB (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:os.memory.max=1024MB (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,821] INFO Client environment:os.memory.total=1024MB (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,838] INFO Initiating client connection, connectString=106.14.132.94:2181 sessionTimeout=18000 watcher=kafka.zookeeper.ZooKeeperClient Z o o K e e p e r C l i e n t W a t c h e r ZooKeeperClientWatcher ZooKeeperClientWatcher@4466af20 (org.apache.zookeeper.ZooKeeper)
[2021-11-16 15:20:11,857] INFO jute.maxbuffer value is 4194304 Bytes (org.apache.zookeeper.ClientCnxnSocket)
[2021-11-16 15:20:11,864] INFO zookeeper.request.timeout value is 0. feature enabled= (org.apache.zookeeper.ClientCnxn)
[2021-11-16 15:20:11,871] INFO [ZooKeeperClient Kafka server] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
[2021-11-16 15:20:21,879] INFO Opening socket connection to server 106.14.132.94/106.14.132.94:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.Client
这篇关于Will not attempt to authenticate using SASL (unknown error) (org的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!