Any solution with this error: Cannot call sendError() Confluence
Asked by digitalunityapps:

I have spent 3 days from my life and nothing . Both MySql and

Postgresql

returns this error :

HTTP Status 500 -- Internal Server Error {#toc-hId-1824906298}
--------------------------------------------------------------

*** ** * ** ***

**Type** Exception Report

**Message** Cannot call sendError() after the response has been committed

**Description** The server encountered an unexpected condition that prevented it from fulfilling the request.

```
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed	org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:456)	javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120)	com.atlassian.confluence.web.filter.DebugFilter$LoggingResponseWrapper.sendError(DebugFilter.java:132)	javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter$1.sendError(FourOhFourErrorLoggingFilter.java:52)	javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120)	com.atlassian.core.filters.HeaderSanitisingResponseWrapper.sendError(HeaderSanitisingResponseWrapper.java:103)	javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120)	javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120)	javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120)	com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter$OAuthWWWAuthenticateAddingResponse.sendError(OAuthFilter.java:147)	com.opensymphony.webwork.dispatcher.ServletDispatcher.sendError(ServletDispatcher.java:349)	com.atlassian.confluence.servlet.ConfluenceServletDispatcher.sendError(ConfluenceServletDispatcher.java:104)	com.atlassian.confluence.servlet.ConfluenceServletDispatcher.serviceAction(ConfluenceServletDispatcher.java:97)	com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199)	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)	com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter$SwapOnBootstrapFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:55)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:35)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)	com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)	com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:56)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.web.filter.ConfluenceOpenSessionInViewFilter.doFilterInternal(ConfluenceOpenSessionInViewFilter.java:38)	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)	com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99)	com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:37)	com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:31)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.confluence.web.filter.HttpRequestStatsFilter.doFilter(HttpRequestStatsFilter.java:47)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:121)	com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:92)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.confluence.web.filter.ConfluenceTimingFilter.doFilter(ConfluenceTimingFilter.java:46)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	com.atlassian.confluence.extra.webdav.servlet.filter.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:409)	com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:29)	com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)	com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)	com.atlassian.confluence.tenant.TenantGateFilter.lambda$doFilter$0(TenantGateFilter.java:35)	com.atlassian.confluence.tenant.TenantGate$3.call(TenantGate.java:145)	com.atlassian.confluence.tenant.TenantGateFilter.doFilter(TenantGateFilter.java:37)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:36)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.internal.web.filter.spring.IgnoreWebAsyncManagerFilter.doFilter(IgnoreWebAsyncManagerFilter.java:59)	com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:51)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:39)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:72)	com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:39)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.doFilter(VCacheRequestContextFilter.java:58)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:33)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:65)	com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:54)	com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:25)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:59)	com.atlassian.confluence.web.ConfluenceJohnsonFilter.doFilter(ConfluenceJohnsonFilter.java:32)	com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.impl.servlet.HoldingUntilStartedFilter.doFilter(HoldingUntilStartedFilter.java:88)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)	com.atlassian.confluence.internal.diagnostics.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:35)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
```


Answers:
author: Shawn C
body: Hello Galanakis,

Looking through a few other Community posts, there are a few different reasons why this error could be occurring:

* Issues with Database Setup using [MySQL](https://confluence.atlassian.com/pages/viewpage.action?pageId=128747) or [PostgreSQL](https://confluence.atlassian.com/pages/viewpage.action?pageId=173244522)
* JAVA_HOME [not set correctly](https://community.atlassian.com/t5/Confluence-questions/Re-Re-HTTP-Status-500-Cannot-call-sendError-after-t/qaq-p/826073/comment-id/111470#M111470) or have the correct version of Java Installed

I'd need a few things to try and help further investigate this issue:

* What Version of Confluence are you installing/running?
* Did you use the Installer or manually install using a ZIP or TAR.GZ file?
* What version of MySQL or PostgreSQL are you using?
* Verify that the [Java JDK](https://confluence.atlassian.com/pages/viewpage.action?pageId=144212101) is installed and the JAVA_HOME is set
  * You can run an "echo $JAVA_HOME" (linux) or "echo %JAVA_HOME%" (windows) to verify installation - Please provide the output

Regards,  
Shawn

comments: author: digitalunityapps
body: Hi,these are my config

* Confluence 6.11.2
* tar.gz
* On MySql : mysql Ver 14.14 Distrib 5.7.23
* On PostgreSQL : psql (PostgreSQL) 10.5
* /usr/lib/jvm/java-11-openjdk-amd64/bin/java


author: Shawn C
body: Hello Galanakis,

Thanks for the details. You'll need to make some changes as some of your [configuration is not supported](https://confluence.atlassian.com/doc/supported-platforms-207488198.htm) by Confluence 6.11.

* MySQL 5.7 is one of the Supported databases however PostgreSQL 10.5 is not; if you're going to use PostgreSQL, you'll want to use either PostgreSQL 9.3, 9.4, 9.5, or 9.6
* Confluence 6.11 currently does not support OpenJDK and will not work with it; you will need to use Java 1.8
  * [Support for OpenJDK](https://community.atlassian.com/t5/Jira-discussions/Java-11-and-OpenJDK-support-for-Atlassian-Server-amp-Data-Center/td-p/872998) is being developed but is not available at this time

For the next steps, I'd recommend installing the latest version Java 1.8 and using MySQL 5.7 however Drop the existing database and delete the [Confluence Home Directory](https://confluence.atlassian.com/pages/viewpage.action?pageId=5902597070) so that they're re-created.

If we're still experiencing issues with starting confluence, please check your Tomcat and Confluence catalina.out logs for any additional errors and let me know what you find.

Regards,  
Shawn


author: digitalunityapps
body: I make the changes and now the error is:

Unable to register MBean \[com.atlassian.confluence.jmx.TaskQueueWrapper@107d13e8\] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue

```
com.atlassian.config.ConfigurationException: Unable to register MBean [com.atlassian.confluence.jmx.TaskQueueWrapper@107d13e8] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue com.atlassian.confluence.setup.actions.AbstractSetupAction.transitionFromColdToVacantState(AbstractSetupAction.java:162) com.atlassian.confluence.setup.actions.SetupDBTypeAction.setupDatabase(SetupDBTypeAction.java:82) com.atlassian.confluence.setup.actions.AbstractDatabaseCreationAction.execute(AbstractDatabaseCreationAction.java:36) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:33) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.xwork.interceptors.XsrfTokenInterceptor.intercept(XsrfTokenInterceptor.java:100) com.atlassian.confluence.xwork.ConfluenceXsrfTokenInterceptor.intercept(ConfluenceXsrfTokenInterceptor.java:29) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.security.interceptors.CaptchaInterceptor.intercept(CaptchaInterceptor.java:42) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.core.ConfluenceLicenseInterceptor.intercept(ConfluenceLicenseInterceptor.java:66) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.validation.MessageHolderInterceptor.intercept(MessageHolderInterceptor.java:37) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:44) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.core.CancellingInterceptor.intercept(CancellingInterceptor.java:21) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.xwork.HttpMethodValidationInterceptor.intercept(HttpMethodValidationInterceptor.java:68) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.security.websudo.WebSudoInterceptor.intercept(WebSudoInterceptor.java:57) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.themes.ThemeContextInterceptor.intercept(ThemeContextInterceptor.java:42) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:96) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.setup.webwork.BootstrapAwareInterceptor.intercept(BootstrapAwareInterceptor.java:21) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.user.actions.UserAwareInterceptor.intercept(UserAwareInterceptor.java:53) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.pages.actions.CommentAwareInterceptor.intercept(CommentAwareInterceptor.java:39) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:68) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:71) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.security.interceptors.ConfluenceAccessInterceptor.intercept(ConfluenceAccessInterceptor.java:31) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) com.atlassian.confluence.xwork.FlashScopeInterceptor.intercept(FlashScopeInterceptor.java:21) com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) 
```


author: digitalunityapps
body: Also i change the folder permissions but still nothing


Tags: confluence-server

server