question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calling [asyncError()] is not valid for a request with Async state [MUST_DISPATCH]

See original GitHub issue

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]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:38

github_iconTop GitHub Comments

5reactions
liangxiong3403commented, Dec 8, 2019

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 problem

4reactions
joshistecommented, Oct 20, 2019

There 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calling [asyncError()] is not valid for a request with Async state ...
when i run client,and refresh admin app. the error is "Calling [asyncError()] is not valid for a request with Async state [MUST_DISPATCH]";.
Read more >
Calling [asyncError()] is not valid for a request with Async state ...
Actually there is a simple solution: Just don't use the Tomcat servlet container but run the admin server in a reactive setup, like:...
Read more >
Calling [asyncComplete()] is not valid for a request with Async ...
asyncComplete() is called in the "finally" section on both success and failure of the background request processing.
Read more >
IOException: Broken Pipe causes "Calling [asyncError()] is not ...
... [asyncError()] is not valid for a request with Async state ... which itself is not >logged, but there is some error from...
Read more >
[Tomcat-dev] [Bug 56042] New: java.lang ... - Grokbase
IllegalStateException: Calling [asyncComplete()] is not valid for a request with. Async state [MUST_DISPATCH] Product: Tomcat 7
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found