spring-boot-admin: Calling [asyncError()] is not valid for a request with Async state [MUST_DISPATCH]
hi ,I use spring boot 2.1.1 and SBA 2.1.1 ,but here is the exception when I start the application . like this:
16:39:17.799 [http-nio-8081-exec-7] ERROR o.a.c.c.CoyoteAdapter: - Exception while processing an asynchronous request
java.lang.IllegalStateException: Calling [asyncError()] is not valid for a request with Async state [MUST_DISPATCH]
at org.apache.coyote.AsyncStateMachine.asyncError(AsyncStateMachine.java:440) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:512) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.coyote.Request.action(Request.java:430) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:382) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:239) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_151]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 38
good news!,i find solution for this.if you use properties to change tomcat version,you will not see that problem again. eg:
<tomcat.version>9.0.29</tomcat.version>,upgrade version to solve problemThere is news on this topic. After asking on the tomcat mailing list and trying the upcoming 9.0.28-dev version of tomcat, the error isn’t logged anymore. So I guess we need just to wait on the next tomcat / spring boot release.
Could confirm. It looks like problem with client registration or at least it prevents it. If you will wait enough, error appears on Application UI.
This problem occurs in SBA 2.1.x and spring 2.1.1.RELEASE, will try to test another configurations
This is fixed in spring boot 2.2.2 and 2.1.11