[2021-07-29 21:41:11,542] INFO Logs loading complete in 282 ms. (kafka.log.LogManager) [2021-07-29 21:41:11,552] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager) [2021-07-29 21:41:11,553] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager) [2021-07-29 21:41:11,780] ERROR [KafkaServer id=0] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) org.apache.kafka.common.KafkaException: Socket server failed to bind to 114.115.219.189:9092: Cannot assign requested address. at kafka.network.Acceptor.openServerSocket(SocketServer.scala:450) at kafka.network.Acceptor.<init>(SocketServer.scala:340) at kafka.network.SocketServer.$anonfun$createAcceptorAndProcessors$1(SocketServer.scala:146) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:58) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:51) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) at kafka.network.SocketServer.createAcceptorAndProcessors(SocketServer.scala:142) at kafka.network.SocketServer.startup(SocketServer.scala:91) at kafka.server.KafkaServer.startup(KafkaServer.scala:250) at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38) at kafka.Kafka$.main(Kafka.scala:75) 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:446) ... 11 more
//出现kafka连接不上的问题,要这么配置
listeners=PLAINTEXT://:9092
advertised.listeners=PLAINTEXT://114.115.20.100:9092