kafka启动配置如下
listeners=PLAINTEXT://localhost:9092
advertised.listeners未配
/etc/hosts文件里面同时配置了(ipv4和ipv6的localhost):
127.0.0.1 localhost
::1 localhost
消费者程序运行在ipv4环境中,且消费一直正常,但是时不时会弹出一个ipv6的connection refused的报错(不影响正常消费)
%3|1677748565.071|FAIL|rdkafka#consumer-6| [thrd:GroupCoordinator]: GroupCoordinator: localhost:9092: Connect to ipv6#[::1]:9092 failed: Connection refused (after 0ms in state CONNECT)
% ERROR CALLBACK: rdkafka#consumer-6: Local: Broker transport failure: GroupCoordinator: localhost:9092: Connect to ipv6#[::1]:9092 failed: Connection refused (after 0ms in state CONNECT), error code [-195]
虽然不影响业务正常运行,但是是什么原因呢?怎么可以避免?循环报错很烦