zeebe-simple-monitor icon indicating copy to clipboard operation
zeebe-simple-monitor copied to clipboard

Error logged: IllegalStateException: getOutputStream() has already been called for this response

Open nitram509 opened this issue 4 years ago • 2 comments

Hi,

I'm about to set up Zeebe in AWS and see many of such error messages in the STDOUT log of Zeebe Simple Monitor. Obviously, I expect zero error messages but have to admit I can't observe wrong behaviour.

From my observation, I can say that Simple Monitor behaves as expected. I can deploy and instantiate workflows.

There seems to be no obvious pattern in the log messages. Please, see log messages and Stacktrace below.

Context:

  • Zeebe Broker Cluster 1.0.1 (using Zeebe Cluster Helm Chart for Kubernetes v0.0.223)
  • Zeebe Simple Monitor 2.0.0 (using Zeebe Monitor Helm Chart for Kubernetes v0.0.1)
  • There's a dedicated Hazelcast Cluster running

Log message pattern (just the first line from the logs)

Jun 30 14:35:42 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 14:35:43 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 14:35:43 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 14:37:10 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 14:37:10 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 14:37:10 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:08:13 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:08:13 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:08:13 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:08:51 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:08:51 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:08:51 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:12:28 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:12:28 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:12:28 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:14:59 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:14:59 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:14:59 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:07 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:07 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:07 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:11 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:11 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:11 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:28 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:28 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:39:28 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:46:02 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:46:03 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:46:03 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:46:07 simple-monitor-deployment-5766c596db-nsqvr   java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:46:08 simple-monitor-deployment-5766c596db-nsqvr   org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
Jun 30 15:46:08 simple-monitor-deployment-5766c596db-nsqvr   Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response

Stacktrace (looks equal for all log messages)

2021-06-30 12:37:09.010 ERROR 1 --- [nio-8082-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
	at org.apache.catalina.connector.Response.getWriter(Response.java:584) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:227) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:114) ~[tomcat-embed-core-9.0.45.jar:4.0.FR]
	at org.springframework.boot.web.servlet.view.MustacheView.renderMergedTemplateModel(MustacheView.java:80) ~[spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:179) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:316) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1393) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1138) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1077) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.45.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.45.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.6.jar:5.3.6]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.6.jar:5.3.6]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.3.6.jar:5.3.6]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.3.6.jar:5.3.6]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:710) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:578) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:514) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:392) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:257) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:352) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:438) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:166) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:59) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
2021-06-30 12:37:09.011 ERROR 1 --- [nio-8082-exec-8] o.a.c.c.C.[Tomcat].[localhost]           : Exception Processing ErrorPage[errorCode=0, location=/error]
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.45.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.45.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.6.jar:5.3.6]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.6.jar:5.3.6]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.3.6.jar:5.3.6]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.3.6.jar:5.3.6]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:710) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:578) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:514) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:392) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:257) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:352) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:438) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:166) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:241) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:59) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
	at org.apache.catalina.connector.Response.getWriter(Response.java:584) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:227) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:114) ~[tomcat-embed-core-9.0.45.jar:4.0.FR]
	at org.springframework.boot.web.servlet.view.MustacheView.renderMergedTemplateModel(MustacheView.java:80) ~[spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:179) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:316) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1393) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1138) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1077) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.6.jar:5.3.6]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.6.jar:5.3.6]
	... 33 common frames omitted

nitram509 avatar Jun 30 '21 14:06 nitram509

I have the same issue. Has someone found some way how to fix it?

thrytsak avatar Jan 04 '24 14:01 thrytsak

I have the same issue. Has someone found some way how to fix it?

Unfortunately, I never found a solution (but I also stopped searching for one ;) ) After ~2 years of seeing this issue, I can ensure you, it's just annoying but I'm not aware of any technical problems related to it.

nitram509 avatar Jan 04 '24 14:01 nitram509