我尝试在openshift env上组成kafka集群。而且我遵循了一个我提到YouTube的指南。 因此,我可以得到3个卡夫卡和1个动物园管理员,但是我也遇到了以下一些错误。 然后我找到了pod的状态(oc get pods --watch),所以我检查了它们的状态为 CrashLoopBackOff 。
我附加了错误日志和yaml文件。
最后,感谢您阅读我的问题。 如果您需要更多信息和配置。
[错误日志]
[2019-12-05 03:36:57,366] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,366] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,366] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,366] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,366] INFO Client environment:os.version=3.10.0-1062.4.3.el7.x86_64 (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,367] INFO Client environment:user.name=root (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,367] INFO Client environment:user.home=/root (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,367] INFO Client environment:user.dir=/opt/kafka (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,368] INFO Initiating client connection, connectString=zookeeper:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@4b0b0854 (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:36:57,390] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient)
[2019-12-05 03:36:57,404] INFO Opening socket connection to server 172.30.214.89/172.30.214.89:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2019-12-05 03:37:00,508] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn) java.net.NoRouteToHostException: No route to host
------------------------------------------------------------------------
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
[2019-12-05 03:37:01,617] INFO Opening socket connection to server 172.30.214.89/172.30.214.89:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2019-12-05 03:37:02,508] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.NoRouteToHostException: No route to host
-------------------------------------------------
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
[2019-12-05 03:37:03,391] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2019-12-05 03:37:03,609] INFO Opening socket connection to server 172.30.214.89/172.30.214.89:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2019-12-05 03:37:06,061] INFO EventThread shut down (org.apache.zookeeper.ClientCnxn)
[2019-12-05 03:37:06,061] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper)
[2019-12-05 03:37:06,062] FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
------------------------------------------------------------------------
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:156)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:130)
at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:75)
at kafka.utils.ZkUtils$.apply(ZkUtils.scala:57)
at kafka.server.KafkaServer.initZk(KafkaServer.scala:294)
at kafka.server.KafkaServer.startup(KafkaServer.scala:180)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37)
at kafka.Kafka$.main(Kafka.scala:67)
at kafka.Kafka.main(Kafka.scala)
[2019-12-05 03:37:06,064] INFO shutting down (kafka.server.KafkaServer)
[2019-12-05 03:37:06,070] INFO shut down completed (kafka.server.KafkaServer)
[2019-12-05 03:37:06,071] FATAL Fatal error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable) org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
------------------------------------------------------------------------
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:156)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:130)
at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:75)
at kafka.utils.ZkUtils$.apply(ZkUtils.scala:57)
at kafka.server.KafkaServer.initZk(KafkaServer.scala:294)
at kafka.server.KafkaServer.startup(KafkaServer.scala:180)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37)
at kafka.Kafka$.main(Kafka.scala:67)
at kafka.Kafka.main(Kafka.scala)
[2019-12-05 03:37:06,072] INFO shutting down (kafka.server.KafkaServer)