ERROR [KafkaServer id=1] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
at kafka.network.Acceptor.openServerSocket(SocketServer.scala:404)
at kafka.network.Acceptor.<init>(SocketServer.scala:308)
at kafka.network.SocketServer$$anonfun$createAcceptorAndProcessors$1.apply(SocketServer.scala:126)
at kafka.network.SocketServer$$anonfun$createAcceptorAndProcessors$1.apply(SocketServer.scala:122)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at kafka.network.SocketServer.createAcceptorAndProcessors(SocketServer.scala:122)
at kafka.network.SocketServer.startup(SocketServer.scala:84)
at kafka.server.KafkaServer.startup(KafkaServer.scala:247)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
at kafka.Kafka$.main(Kafka.scala:92)
at kafka.Kafka.main(Kafka.scala)
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at kafka.network.Acceptor.openServerSocket(SocketServer.scala:400)
... 11 more
[2019-01-14 23:12:26,937] INFO [KafkaServer id=1] shutting down (kafka.server.KafkaServer)
[2019-01-14 23:12:26,938] INFO [SocketServer brokerId=1] Stopping socket server request processors (kafka.network.SocketServer)
[2019-01-14 23:12:26,939] INFO [SocketServer brokerId=1] Stopped socket server request processors (kafka.network.SocketServer)
[2019-01-14 23:12:26,942] INFO Shutting down. (kafka.log.LogManager)
[2019-01-14 23:12:26,955] INFO Shutdown complete. (kafka.log.LogManager)
[2019-01-14 23:12:26,955] INFO [ZooKeeperClient] Closing. (kafka.zookeeper.ZooKeeperClient)
[2019-01-14 23:12:26,961] INFO Session: 0x3684fa4f09a000d closed (org.apache.zookeeper.ZooKeeper)
[2019-01-14 23:12:26,961] INFO EventThread shut down for session: 0x3684fa4f09a000d (org.apache.zookeeper.ClientCnxn)
[2019-01-14 23:12:26,962] INFO [ZooKeeperClient] Closed. (kafka.zookeeper.ZooKeeperClient)
[2019-01-14 23:12:26,962] INFO [ThrottledRequestReaper-Fetch]: Shutting down (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:27,643] INFO [ThrottledRequestReaper-Fetch]: Stopped (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:27,644] INFO [ThrottledRequestReaper-Fetch]: Shutdown completed (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:27,644] INFO [ThrottledRequestReaper-Produce]: Shutting down (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:27,656] INFO [ThrottledRequestReaper-Produce]: Stopped (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:27,656] INFO [ThrottledRequestReaper-Produce]: Shutdown completed (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:27,656] INFO [ThrottledRequestReaper-Request]: Shutting down (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:28,675] INFO [ThrottledRequestReaper-Request]: Stopped (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:28,675] INFO [ThrottledRequestReaper-Request]: Shutdown completed (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
[2019-01-14 23:12:28,677] INFO [SocketServer brokerId=1] Shutting down socket server (kafka.network.SocketServer)
[2019-01-14 23:12:28,710] INFO [SocketServer brokerId=1] Shutdown completed (kafka.network.SocketServer)
[2019-01-14 23:12:28,714] INFO [KafkaServer id=1] shut down completed (kafka.server.KafkaServer)
[2019-01-14 23:12:28,715] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2019-01-14 23:12:28,717] INFO [KafkaServer id=1] shutting down (kafka.server.KafkaServer)

 

错误原因,一个小问题

    自己copy了server.properties文件到各个节点没有修改下面的配置 监听器的配置,应该指向节点本身的主机名和端口,我全部四台机器都指向了hdp1,所以导致了只有节点1是正常的

listeners=PLAINTEXT://hdp4:9092   

转载于:https://www.cnblogs.com/QuestionsZhang/p/10271196.html

Logo

Kafka开源项目指南提供详尽教程,助开发者掌握其架构、配置和使用,实现高效数据流管理和实时处理。它高性能、可扩展,适合日志收集和实时数据处理,通过持久化保障数据安全,是企业大数据生态系统的核心。

更多推荐