Hello, I’m currently facing an issue with the subscriptions closing after the app being alive for some time.
I’m using https://camunda.com/blog/2021/03/external-task-client-spring-bootified/ and i’m not setting up the datasource bean as we don’t need to be connected to db, most of the tasks in my repo will be external tasks, which will be subscribed to and do the needed. What i don’t understand is the app runs fine initially after deploying it, but after some time i’m noticing that the subscriptions are closed and the logs are as below. Is this due to the health check failure ? or Does camunda expect a database connection for sure ?
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.web.servlet.DispatcherServlet - GET "/actuator/health", parameters={}
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Mapped to ResourceHttpRequestHandler ["classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/", "/"]
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.w.s.r.ResourceHttpRequestHandler - Resource not found
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.web.servlet.DispatcherServlet - Completed 404 NOT_FOUND
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.web.servlet.DispatcherServlet - "ERROR" dispatch for GET "/error", parameters={}
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#error(HttpServletRequest)
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.w.s.m.m.a.HttpEntityMethodProcessor - Using 'application/json', given [*/*] and supported [application/json, application/*+json, application/json, application/*+json]
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.w.s.m.m.a.HttpEntityMethodProcessor - Writing [{timestamp=Fri Dec 10 15:11:14 UTC 2021, status=404, error=Not Found, message=, path=/actuator/healt (truncated)...]
2021-12-10 15:11:14 Camunda-Demo [http-nio-8080-exec-8] DEBUG o.s.web.servlet.DispatcherServlet - Exiting from "ERROR" dispatch, status 404
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@4b8ee4de, started on Fri Dec 10 15:08:58 UTC 2021
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'webServerGracefulShutdown' completed its stop procedure
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483646
CCM2 Watcher Task received notification:ENTRY_MODIFY,..2021_12_10_04_56_40.426947085, Listeners:[io.strati.tunr.utils.client.ServiceConfigVersionCacheImpl@5bcbb2ed, io.strati.tunr.utils.client.processor.ConfigProxyHandler@16d590ac]
2021-12-10 15:11:14 Camunda-Demo [TopicSubscriptionManager] DEBUG org.camunda.bpm.client - TASK/CLIENT-03008 Fetch and lock new external tasks for 3 topics
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'webServerStartStop' completed its stop procedure
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483547
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry' completed its stop procedure
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG org.camunda.bpm.client.spring - TASK/CLIENT/SPRING-02007 Subscription for topic name topic1 closed
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG org.camunda.bpm.client.spring - TASK/CLIENT/SPRING-02007 Subscription for topic name topic2 closed
2021-12-10 15:11:14 Camunda-Demo [SpringContextShutdownHook] DEBUG org.camunda.bpm.client.spring - TASK/CLIENT/SPRING-02007 Subscription for topic name topic3 closed
2021-12-10 15:11:15 Camunda-Demo [SpringContextShutdownHook] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'applicationTaskExecutor'
Thanks