这个是容器的zookeeper配置文件
为什么在宿主机telnet容器2181端口不通?
这又是什么问题?
[root@worker1 kafka_2.12-3.9.0]# bin/zookeeper-shell.sh localhost:2181 ls /brokers/ids
Connecting to localhost:2181
[2025-01-13 22:03:56,488] WARN Session 0x0 for server localhost/127.0.0.1:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException. (org.apache.zookeeper.ClientCnxn)
EndOfStreamException: Unable to read additional data from server sessionid 0x0, likely server has closed socket
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:77)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1289)
KeeperErrorCode = ConnectionLoss for /brokers/ids
[2025-01-13 22:03:56,647] ERROR Exiting JVM with code 1 (org.apache.zookeeper.util.ServiceUtils)