camel-platform-http-starter with undertow returns HTTP Status 503 with WARN log "Caused by: [org.springframework.web.context.request.async.AsyncRequestNotUsableException - Response not usable after async request completion.]"
Issue
Due to long running process in a camel route, the camel-platform-http-starter with undertow returns HTTP Status 503 with WARN log.
2025-08-04T09:31:35.078+09:00 WARN 12043 --- [custom-engine-2] c.c.p.h.s.SpringBootPlatformHttpConsumer : Failed writing HTTP response url: xxx due to: Response not usable after async request completion.. Caused by: [org.springframework.web.context.request.async.AsyncRequestNotUsableException - Response not usable after async request completion.]
org.springframework.web.context.request.async.AsyncRequestNotUsableException: Response not usable after async request completion.
at org.springframework.web.context.request.async.StandardServletAsyncWebRequest$LifecycleHttpServletResponse.obtainLockOrRaiseException(StandardServletAsyncWebRequest.java:338) ~[spring-web-6.2.6.jar!/:6.2.6]
at org.springframework.web.context.request.async.StandardServletAsyncWebRequest$LifecycleHttpServletResponse.getOutputStream(StandardServletAsyncWebRequest.java:282) ~[spring-web-6.2.6.jar!/:6.2.6]
at org.apache.camel.component.platform.http.springboot.SpringBootPlatformHttpBinding.doWriteDirectResponse(SpringBootPlatformHttpBinding.java:223) ~[camel-platform-http-starter-4.10.3.redhat-00019.jar!/:4.10.3.redhat-00019]
at org.apache.camel.http.common.DefaultHttpBinding.doWriteResponse(DefaultHttpBinding.java:451) ~[camel-http-common-4.10.3.redhat-00020.jar!/:4.10.3.redhat-00020]
at org.apache.camel.http.common.DefaultHttpBinding.writeResponse(DefaultHttpBinding.java:371) ~[camel-http-common-4.10.3.redhat-00020.jar!/:4.10.3.redhat-00020]
at org.apache.camel.component.platform.http.springboot.SpringBootPlatformHttpConsumer.afterProcess(SpringBootPlatformHttpConsumer.java:161) ~[camel-platform-http-starter-4.10.3.redhat-00019.jar!/:4.10.3.redhat-00019]
at org.apache.camel.component.platform.http.springboot.SpringBootPlatformHttpConsumer.handleService(SpringBootPlatformHttpConsumer.java:150) ~[camel-platform-http-starter-4.10.3.redhat-00019.jar!/:4.10.3.redhat-00019]
at org.apache.camel.component.platform.http.springboot.SpringBootPlatformHttpConsumer.lambda$service$0(SpringBootPlatformHttpConsumer.java:95) ~[camel-platform-http-starter-4.10.3.redhat-00019.jar!/:4.10.3.redhat-00019]
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Environment
- Red Hat Build of Apache Camel for Spring Boot
- 4.10
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.