kafka-python: producer is not able to connect

后端 未结 7 2131
你的背包
你的背包 2020-12-16 00:29

kafka-python (1.0.0) throws error while connecting to the broker. At the same time /usr/bin/kafka-console-producer and /usr/bin/kafka-console-consumer work fine.

Pyt

7条回答
  •  感情败类
    2020-12-16 01:16

    A host could have multiple dns aliases. Any of them would work for ssh or ping test. However kafka connection should use the alias that matches advertised.host.name in server.properties file of the broker.

    I was using a different alias in bootstrap_servers parameter. Hence an error. Once I changed the call to use advertised.hostname, the problem was solved

提交回复
热议问题