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]
Aside from the logged error everything is working fine?
Aside from the logged error everything is working fine?
Nothing else is ok
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
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
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
you found the problems too?
I can't currently reproduce the issue. Could you please provide a project to reproduce the problem?
I can't currently reproduce the issue. Could you please provide a project to reproduce the problem?
@joshiste
server-demo.zip
launch and access in the browser ,wait a little time
I have the ui now open for about 1 hour and didn't experience the Server connection failed. message.
I do get the warning in the server logs, but these should not be a problem:
The ui does a long polling, when the browser closed the connection and afterwards the server tries to write some data on this connection the warning is emitted.
More on this problem here: https://github.com/spring-projects/spring-boot/issues/15057
As the application is running as expected and the message is logged by tomcat we can't do anything about it. Therefore I'm closing this issue.
I also encountered, how to solve
I also encountered, how to solve
I also encountered,
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.16.jar:9.0.16]
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:512) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.Request.action(Request.java:430) ~[tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:396) ~[tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:239) ~[tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.16.jar:9.0.16]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_112]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.16.jar:9.0.16]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112]
how to solve??
this is bug?
I don't know but it doesn't affect the run
------------------ Original ------------------
From: wangChengChao notifications@github.com
Date: Fri,Apr 19,2019 4:13 PM
To: codecentric/spring-boot-admin spring-boot-admin@noreply.github.com
Cc: Enoch az359894057@qq.com, Comment comment@noreply.github.com
Subject: Re: [codecentric/spring-boot-admin] Calling [asyncError()] is not valid for a request with Async state [MUST_DISPATCH] (#1039)
this is bug?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
notifications
but spring-boot-admin-server not working
and the client
[DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.d.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://127.0.0.1:8888/eureka/}
com.sun.jersey.api.client.ClientHandlerException: org.apache.http.NoHttpResponseException: 127.0.0.1:8888 failed to respond
I don't know but it doesn't affect the run
…
------------------ Original ------------------ From: wangChengChao notifications@github.com Date: Fri,Apr 19,2019 4:13 PM To: codecentric/spring-boot-admin spring-boot-admin@noreply.github.com Cc: Enoch az359894057@qq.com, Comment comment@noreply.github.com Subject: Re: [codecentric/spring-boot-admin] Calling [asyncError()] is not valid for a request with Async state [MUST_DISPATCH] (#1039) this is bug? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
but spring-boot-admin-server not working
and the client error
[DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.d.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://127.0.0.1:8888/eureka/}
com.sun.jersey.api.client.ClientHandlerException: org.apache.http.NoHttpResponseException: 127.0.0.1:8888 failed to respond
I also encountered,
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.16.jar:9.0.16]
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:512) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.Request.action(Request.java:430) ~[tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:396) ~[tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:239) ~[tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) [tomcat-embed-core-9.0.16.jar:9.0.16]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.16.jar:9.0.16]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_112]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.16.jar:9.0.16]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112]
how to solve??
I also encountered? Do you hnow how to fix it
I also encountered, the springboot version is 2.1.5 Release
2019-05-24 17:17:26.340 [ERROR] 82487 --- [http-nio-8100-exec-8] [org.apache.catalina.connector.CoyoteAdapterlog:175] : 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.19.jar:9.0.19]
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:512) ~[tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.coyote.Request.action(Request.java:430) ~[tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:401) ~[tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:239) [tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) [tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53) [tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836) [tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747) [tomcat-embed-core-9.0.19.jar:9.0.19]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.19.jar:9.0.19]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_40]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.19.jar:9.0.19]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_40]
but Does not affect normal use
ountered, the springboot ver
me too, but i don't know how to fix it
and do not affect normal use
but Does not affect normal use
yes, but not glad to see it
Jetty is OK.
I also encountered,do not know why close it @joshiste ,my tomcat version is apache-tomcat-9.0.17 and springboot version is 2.1.4.RELEASE
No matter I use the embedded tomcat or a standard tomcat,the exception will always occur
[2019-06-21 11:32:52.144 ERROR 10320 --- [nio-8080-exec-7] o.a.catalina.connector.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.17.jar:9.0.17]
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:512) [tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.coyote.Request.action(Request.java:430) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:401) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:239) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) [tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53) [tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) [tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) [tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.17.jar:9.0.17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_74]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.17.jar:9.0.17]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]](url)
I also encountered.
Spring Boot version: 2.1.6.RELEASE and SBA version is 2.1.6 too. But as @wjzdl1314 said, does not affect normal use. In embedded or standart tomcat, this error appears. Although not affect normal use, it annoys me to see this in logs everytime.
I can confirm that this error is happening when using built-in Tomcat, though it doesn't seem to break anything, as mentioned above.
Any plans on getting rid of it? It's still a not very good side effect since it's polluting the logs. I have read the comment above that it's a Tomcat issue and it really might be. On the other hand, it doesn't occur without the Spring Boot Admin enabled, so it's somehow caused by the Spring Boot Admin module...
On the other hand, it doesn't occur without the Spring Boot Admin enabled, so it's somehow caused by the Spring Boot Admin module...
Do Server Sent Events in a regular Spring Boot app and you'll see the same.
Maybe there's some way to suppress this kind of entries in the log? By setting some Tomcat property, IDK...
I had the same Issue. Could fix it by using the same Version of Spring boot/cloud with Admin and Registry. Spring Boot 2.1.6.RELEASE and spring cloud Greenwich.RELEASE.
This issue also occured by refreshing the browser frequently, with Spring boot version 2.1.7 and SBA version 2.1.5.
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.22.jar:9.0.22]
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:512) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.coyote.Request.action(Request.java:430) ~[tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:401) ~[tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:239) ~[tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.22.jar:9.0.22]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_212]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.22.jar:9.0.22]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]
I had the same Issue. Could fix it by using the same Version of Spring boot/cloud with Admin and Registry. Spring Boot 2.1.6.RELEASE and spring cloud Greenwich.RELEASE.
no, is doesn't effect
Has this problem been solved? can someone help me ? Admin project has error in the web UI,admin status is down
@RoyalXC this error doesn't affect the ui to be working. I guess you have some other kind of problem.
@RoyalXC this error doesn't affect the ui to be working. I guess you have some other kind of problem.
sorry,i made a mistake
I also encountered issue with
Spring Boot version: 2.1.6.RELEASE and SBA version is 2.1.6 too.
the problem is SBA not listing http traces for that application
am getting something went wrong message in SBA's UI it's not capturing http traces ...
@suryalokhande I doubt that this error has to do with http traces not being captured, as this is done by the spring boot actuator endpoint (and not sba)
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.
I was able to get the error in the title when I was negative testing with incorrect credentials in the web application:
spring.boot.admin.client.instance.metadata.user.name=admin
spring.boot.admin.client.instance.metadata.user.password=wrong_password
The app registered fine, but once I tried to get details such as on the JVM, authentication must have failed. Put the right password back, and no error.
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
This is fixed in spring boot 2.2.2 and 2.1.11
Most helpful comment
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.