PushAtmospereHandler throws Exception on every refresh

Hi,

I’m getting this nasty error in my logfile on every request.

2021-04-22 11:54:28.821 ERROR 81870 --- [sphere-Shared-0]
 c.v.f.s.c.PushAtmosphereHandler          : Exception in push connection

org.apache.coyote.CloseNowException: Failed write
	at org.apache.coyote.http11.Http11OutputBuffer$SocketOutputBuffer.doWrite(Http11OutputBuffer.java:548) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:110) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.coyote.http11.Http11OutputBuffer.doWrite(Http11OutputBuffer.java:193) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.coyote.Response.doWrite(Response.java:606) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:340) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:783) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:299) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:273) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.catalina.connector.Response.flushBuffer(Response.java:500) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:312) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:181) ~[tomcat-embed-core-9.0.44.jar:4.0.FR]

	at org.atmosphere.cpr.AtmosphereResponseImpl.flushBuffer(AtmosphereResponseImpl.java:506) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at org.atmosphere.cpr.AtmosphereInterceptorWriter.flush(AtmosphereInterceptorWriter.java:102) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at org.atmosphere.cpr.AtmosphereResponseImpl$Stream.flush(AtmosphereResponseImpl.java:1001) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:156) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at com.vaadin.flow.server.communication.PushAtmosphereHandler.onStateChange(PushAtmosphereHandler.java:52) ~[flow-server-2.5.3.jar:2.5.3]

	at org.atmosphere.cpr.DefaultBroadcaster.invokeOnStateChange(DefaultBroadcaster.java:1037) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at org.atmosphere.cpr.DefaultBroadcaster.prepareInvokeOnStateChange(DefaultBroadcaster.java:1057) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:871) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:474) ~[atmosphere-runtime-2.4.30.slf4jvaadin1.jar:2.4.30.slf4jvaadin1]

	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]

	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]

	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]

	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[na:na]

	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[na:na]

	at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]


2021-04-22 11:54:28.846  INFO 81870 --- [nio-8080-exec-3]
 o.a.catalina.connector.CoyoteAdapter     : Encountered a non-recycled response and recycled it forcedly.

org.apache.catalina.connector.CoyoteAdapter$RecycleRequiredException: null
	at org.apache.catalina.connector.CoyoteAdapter.checkRecycled(CoyoteAdapter.java:539) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.coyote.http11.Http11Processor.recycle(Http11Processor.java:1368) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.coyote.AbstractProtocol$ConnectionHandler.release(AbstractProtocol.java:1097) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:1018) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[na:na]

	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[na:na]

	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.44.jar:9.0.44]

	at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]


There is nothing really in the application yet, just a HomePage with a single span.
The only special thing is that I’m running the ui not on / but on /ui using vaadin.urlMapping in the application.yml file.

Any ideas what might be causing this?

(Using Vaadin 14.5.3)

Regards,
kristof

Is it the same as this case: https://github.com/vaadin/flow/issues/9882#issuecomment-774072411 ?

YES!!! That was it.

Thank you!

I assumed I needed SpringServlet instead of VaadinServlet in order to make Spring work in Vaadin components, but apparently that’s not the case.