kafka启动报错
报错现象:启动失败,日志:rg.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry';1.检查maven引入kafka客户端版本是否一致。3.检查kafka的配
一、Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry';
报错现象:启动失败,日志:rg.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
解决办法:
1.检查maven引入kafka客户端版本是否一致
2.检查网络是否互通,如果不通,是否开启了防火墙
3.检查kafka的配置问题。kafka中的配置:
listeners=PLAINTEXT://XXX:9092
advertised.listeners=PLAINTEXT://XXX:9092
XXX 代表安装kaka的ip地址
如果没有配置有可能不能访问
4.如果kafka是容器配置的。
KAFKA_ADVERTISED_LISTENERS=INSIDE://192.168.10.8:9092,OUTSIDE://10.10.10.36:9094
KAFKA_LISTENERS=INSIDE://:9092,OUTSIDE://:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME=INSIDE
更多推荐
所有评论(0)