spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.5k stars 38.1k forks source link

Application run failed,but process is not exited.mongo,rabbitmq,tomcat were all closed,but kafka is alive.I have met two times,I have no idea,I need some help. #23357

Closed strugglekian closed 5 years ago

strugglekian commented 5 years ago

2019-07-23 20:25:35 [org.springframework.context.support.AbstractApplicationContext:554] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.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 2019-07-23 20:25:35 [org.springframework.scheduling.concurrent.ExecutorConfigurationSupport:208] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor - Shutting down ExecutorService 'applicationTaskExecutor' 2019-07-23 20:25:35 [org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer:1190] INFO org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer - Shutdown ignored - container is not active already 2019-07-23 20:25:35 [com.mongodb.diagnostics.logging.SLF4JLogger:71] INFO org.mongodb.driver.connection - Closed connection [connectionId{localValue:4}] to mongos-svc:27017 because the pool has been closed. 2019-07-23 20:25:35 [com.mongodb.diagnostics.logging.SLF4JLogger:71] INFO org.mongodb.driver.connection - Closed connection [connectionId{localValue:2}] to mongos-svc:27017 because the pool has been closed. 2019-07-23 20:25:35 [org.apache.juli.logging.DirectJDKLog:173] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat] 2019-07-23 20:25:35 [org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener:142] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-07-23 20:25:35 [org.springframework.boot.SpringApplication:858] ERROR org.springframework.boot.SpringApplication - Application run failed org.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) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) at com.h3c.iot.IotsdkservermgrApplication.main(IotsdkservermgrApplication.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) Caused by: org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata 2019-07-23 21:04:04 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=2075377223, epoch=4257): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 21:07:41 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=609016071, epoch=4700): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 21:20:34 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-8, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=1414506249, epoch=6592): INVALID_FETCH_SESSION_EPOCH. 019-07-23 21:57:35 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 2 was unable to process the fetch request with (sessionId=1581749342, epoch=11037): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 22:21:44 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-8, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=864693921, epoch=7289): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 22:34:19 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=1494210423, epoch=15377): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 22:54:11 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=1564129696, epoch=2367): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 23:03:10 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-4, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=1117881135, epoch=18080): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 23:07:27 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 2 was unable to process the fetch request with (sessionId=31438056, epoch=8327): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 23:07:27 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=663747677, epoch=19353): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 23:12:13 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=866581978, epoch=567): INVALID_FETCH_SESSION_EPOCH. 2019-07-23 23:37:08 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=1424368118, epoch=17737): INVALID_FETCH_SESSION_EPOCH.

snicoll commented 5 years ago

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Also, please note that this issue tracker is dealing with core framework issues only (that doesn't include the Spring integration with Kafka).