HTTP Status 500 - Cannot call sendError() after the response has been committed

williamc February 19, 2018

Hi,

 

I'm getting the above error - I've searched other answers but I am using Mysql and no proxy, so, they didn't help.

Basically, I have Jira/Bitbucket/Bamboo/Confluence on a single server - the other 3 apps work fine and are setup on MySQL, I didn't realise that when I installed Confluence, it was using the embedded database.

It worked fine for a while (using the quickstart/demo files) and we only had about 2 pages in there (only just started using it), and all of a sudden, it would just lag out after clicking edit.

When I logged in, it gave me the health warning that I was using the embedded database.

I uninstalled Confluence and deleted the home directory and application directory (after taking a backup). I then reinstalled the latest version as my installed version was a bit old.

Setup ran fine, I copied over the Mysql java file (same one I used for JIRA), and it passed the database test. Only thing out of the ordinary was I had to type "set global transaction isolation level READ COMMITTED" in SQL due to getting the error.

It then gave me the option of overwriting the existing database (I created it as per setup guide), and then after a few minutes, it comes up with the following error:




HTTP Status 500 - Cannot call sendError() after the response has been committed

type Exception report

message Cannot call sendError() after the response has been committed

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
	org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:462)
	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)
	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:729)
	com.atlassian.confluence.util.profiling.ProfilingSiteMeshFilter.doFilter(ProfilingSiteMeshFilter.java:55)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:64)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
	com.atlassian.confluence.jmx.JmxFilter.doFilter(JmxFilter.java:98)
	com.atlassian.confluence.cache.TransactionalCacheFactoryCleanupFilter.doFilter(TransactionalCacheFactoryCleanupFilter.java:22)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.util.UserLoggingContextFilter.doFilter(UserLoggingContextFilter.java:32)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.util.UserNameHeaderFilter.doFilter(UserNameHeaderFilter.java:25)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.web.filter.MauEventFilter.doFilter(MauEventFilter.java:42)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:39)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.web.filter.ConfluenceTimeoutFilter.doFilter(ConfluenceTimeoutFilter.java:57)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:88)
	com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.doFilter(ConfluenceSecurityFilter.java:25)
	com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:25)
	com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter$SwapOnBootstrapFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:45)
	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.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:64)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
	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.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:64)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
	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.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:49)
	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.web.filter.DebugFilter.doFilter(DebugFilter.java:46)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.48 logs.


Apache Tomcat/8.0.48




 Can anyone offer any assistance?

5 answers

1 accepted

2 votes
Answer accepted
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2018

Just a quick update to let everyone know that William did get Confluence installed: Unable to reinstall Confluence, different Java errors at different stages.

So there was a happy ending to the story. :)

Jeffrey Thornsen June 20, 2018

Thank you for this.  I was running into a similar issue, and the solution for me was to ensure that the JRE_HOME was pointing to a full Java SDK/JDK, not just a regular JRE.

Like Dmitrii Gasii likes this
1 vote
ivanff August 24, 2018

Confluence is the worst program I've installed,
I spent the whole day making it work, but that's what happened.

on my local machine everything was established without problems, but on the server on which it is necessary not, I constantly receive a similar error for the built-in database, postgresql

Specially installed the virtual machine with pure linux, but I receive the same error

tried older version, tried different java nothing helps

after allegedly installing the database, I get an error
very bad product and incredibly not informative error messages!

1 vote
小安 April 23, 2018

I think the confluence very bad . This is the case for each installation . unsolvable.

1 vote
williamc February 20, 2018

So, I did a reinstall, and dropped the database.

 

It seemed to go ok and then took me to a plain looking (like CSS failed to load) page where I could select Example Site, Empty Site or Restore from backup:

conf.png

I selected Example site, and, after a few seconds, I got another error message (bits omitted) 

 

 

Oops - an error has occurred

 

Cause

java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
    at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:462)

Stack Trace:[hide]

java.lang.IllegalStateException: Cannot call sendError() after the response has been committed at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:462) at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120) at com.atlassian.confluence.web.filter.DebugFilter$LoggingResponseWrapper.sendError(DebugFilter.java:132) at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120) at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter$1.sendError(FourOhFourErrorLoggingFilter.java:52) at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120) at com.atlassian.core.filters.HeaderSanitisingResponseWrapper.sendError(HeaderSanitisingResponseWrapper.java:103) at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:120) at

 

I've deleted a lot of the error as I assume it won't be read/people may know already and the forum kept blocking it.

 

Is anyone able to assist further?

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2018

The short answer is that if you set up the database again, following Database Setup For MySQL (which describes setting the global transaction isolation in the configuration file for MySQL) and delete the home directory again, the setup wizard will probably run without an error.

The option to overwrite an existing Confluence database should not have appeared with a blank database so I speculate that some tables were created before the isolation level was set. For whatever reason, the setup could not be completed on the database.

I saw this knowledge base article with a similar error but you don't mention using Okta so I doubt it's relevance - just sharing my research: Unable to login to Confluence with the error message "Cannot call sendRedirect() after the response has been committed"

If you want more details on how the setup failed, please check the atlassian-confluence.log at <Confluence_home>/logs. According to this Stack Overflow post, the error you are seeing in the browser is the Tomcat web server basically saying it can't redirect to a proper error page.

williamc February 20, 2018

Hi Ann,

The database should have been empty, I only ran the create table as per the KB article.

I'm fine dropping and starting again.

However, this database server is used by the other products and I ideally want to avoid downtime if possible. I read the article after I got the warning about transactions the first time, and running:

"set global transaction isolation level READ COMMITTED" on the SQL server, then clicking test connection got rid of the error, so, is this not good enough?

If I really have to restart Mysql, I don't mind, but, I would have thought that running this command would would do the same job?.

Thanks,

William

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2018

Hi William,

I am not MySQL savvy enough to know if that command line statement will persist from session to session or after a restart. One thing you could try without restarting MySQL is to create a new blank database as described in the guide and try the Confluence setup against that.

Getting the "overwrite" option during the setup wizard is an indication that tables exist in the database. When you create a new blank database and run the setup, you should not see that. My theory is the setup wizard created some tables before it gave you the error, and then had trouble overwriting them.

Thanks,

Ann 

williamc February 20, 2018

Hi Ann,

 

Is there a way to just delete the config files in order to restart the setup again? I've reinstalled confluence at least 5 times now and it's getting tiring!

 

... In addition, how many times can I do it before my serial key gets blacklisted? I've gone through the setup now many times...

Like 贾晨阳 likes this
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2018

The setup wizard will restart if you delete the file: <Confluence_Home_dir>/confluence.cfg.xml. Our licenses don't "call home" or detect multiple installations so you should be okay regarding the license.

Please do create a new database for the setup wizard to run against.

williamc February 20, 2018

Sorry, missed this answer - Thanks, good to know. I've tried again and still am coming up with errors (below)

 

I'm about to try to run Mysql in the approved way and cross my fingers downtime is minimal.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events