各位大神,请教一个问题。实在不知道怎么整了,是这样的情形,公司内网做的kafka集群是三个结点,具体怎么做的我不知道,我们使用时是在springboot中配置三个地址(brokers:ip:9092,IP:9092,IP:9092。zk-nodes:IP:2181,IP:2181,IP:2181)。
然后现在分别做映射到了外网分别有对应的ip和端口。springboot中kafka却是不能用的。然后我在外网机器上弄了一个kafka,去向公司的kafka发送消息一直报错:
ERROR Error when sending message to topic test999 with key: null, value: 1 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for test999-0: 1504 ms has passed since batch creation plus linger time。
然后我把advertised.listeners=PLAINTEXT://***:9092
改成公司某一个结点,报下面的错
WARN Connection to nodeionWARN Connection to node -1 could not be established. Broker may nottstablished could not be established. Broker may could not be established. Broker may not be coulde could not be established. Broker may not be could not be established. Broker may notcouldt could not be established. Broker may not be available. (org.apache.kafka.clients couldtstablished could not be established. Broker could not be established. Broker may not be availablee could not be established. Broker may not be could not be established. Broker may not be availablecouldt established. Broker may not be available. (org.apache could not could not be established. Broker may not be availableld could not be established. Broker could not be established. Broker may not bee could not be established. Broker may not could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
不知道怎么改,属于小白级别,忘指点迷津。
listeners=PLAINTEXT://内网ip:9092
最终如何解决的?我现在也遇到这样的需求,内网搭建的kafka集群,外地的producer需要发送数据到集群,现在通过公网ip不同端口映射到内网的ip和端口,如:50.1.1.9:19094映射内网192.168.10.44:9092,现在外地的producer通过50.1.1.9:19094无法发送消息到集群,报错信息与题主问题一样,按照网上也配置了listeners=0.0.0.0:19094,advertised.host.name=50.1.1.9,advertised.port=19094。
你好你这个问题弄好了么?我也碰到了跟你一样的问题
能给个联系方式么?想跟你咨询一下这个问题
https://www.orchome.com/1903
你的答案