在aws上部署kafka

yqyhoc1h  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(513)

我正试图在aws上部署Kafka。运行kafka服务器时,出现以下错误:

kafka.common.KafkaException: Socket server failed to bind to hostname:9092: Cannot assign requested address.
        at kafka.network.Acceptor.openServerSocket(SocketServer.scala:309)
        at kafka.network.Acceptor.<init>(SocketServer.scala:237)
        at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:108)
        at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:91)
        at scala.collection.Iterator$class.foreach(Iterator.scala:742)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
        at scala.collection.MapLike$DefaultValuesIterable.foreach(MapLike.scala:206)
        at kafka.network.SocketServer.startup(SocketServer.scala:91)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:179)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37)
        at kafka.Kafka$.main(Kafka.scala:67)
        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:305)

有人知道这件事吗?提前谢谢。

tvmytwxo

tvmytwxo1#

尝试将advised.listeners设置为公共弹性ip,以便初始引导元数据请求将返回客户端可以实际连接的ip。

相关问题