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

I'm fairly new to Confluence, I'm trying to get it setup and I'm getting an error after "Test Connection".  The test is successful, but once I hit "Next" and I get the status message "Please wait while we setup the Database for the first time", after a few minutes I get this:

 

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

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)

The DB its connecting to is SQL Express 2017. I've tried 2 different SQL users (confluence user and SA)

 

Any ideas?  Or any suggestions where to start looking?

6 answers

This widget could not be displayed.

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

Hi there,

The error tends to be because either you're using an unsupported SQL version, or haven't followed our guide to set up the database properly.

If you're encountering the error each time it's likely one of these problems.

Can you confirm your database version and that you have completely set up using the guide from our page?

Shannon

This widget could not be displayed.

Dear shannon,

I am encountering the same problem after I installed mysql 5.7.22. Is it unsupported?

Thanks upfront and best regards,

Maria

Maria,

According to our Supported Platforms page, MySQL 5.7 is supported in the most recent versions of Confluence.

If you can confirm you followed our MySQL Setup guide exactly, then I would advise you to raise a ticket with support and provide a copy of your Support Zip so we can have a look and see what the problem is with your instance.

Once you're able to resolve it there please feel free to come back here and share the resolution.

Regards,

Shannon

Dear Shannon,

thanks a lot! I deleted the config XML and deactivated SSL for the DB connection and it works now.

Best regards,

Maria

Sorry Berkan but I dont know anymore how I deactivated it. but it depends if you activate SSL for your Confluence site or not. Just following the troubleshoot and guide pointed by Shannon helped me fix the issue.

Good luck :)

This widget could not be displayed.

Hi there,

For our latest version of Confluence (6.6), SQL Express 2017 is not supported. The only versions of SQL that are supported are:

Microsoft SQL Server:

(tick) SQL Server 2012

(tick) SQL Server 2014

Please note this does not include express versions.

Could you try again with a supported database and let us know if you have the same issue?

Confluence Supported Databases

Regards,

Shannon

Hello Shannon,

I am experiencing the same exact issue - although I am running SQL Server 2014.

Please advise.

Thank you

Hi Jerry,

Unfortunately the error is too generic for us to properly diagnose your exact issue.

To rule out any setup issues first, could you please review the following article?

I would pay closest attention to the user creation steps and the encoding setup steps.

If you continue to experience an error after testing the database connection, please examine your logs between Starting Confluence... and the setup database step. These should be logged in the Confluence home directory in /logs/atlassian-confluence.log.

Please feel free to share any relevant entries.

Let us know if you have any trouble.

Regards,

Shannon

This widget could not be displayed.

I am having the same identical issue. 

Benjamin,

We'd need to know the same information above in order to help you with your case. Could you confirm your database server version and have a look at your logs as above?

If you continue to experience an error after testing the database connection, please examine your logs between Starting Confluence... and the setup database step. These should be logged in the Confluence home directory in /logs/atlassian-confluence.log.

Regards,

Shannon

I was actually able to figure this out for SQL SERVER 2016.

It turns out if you go and set the compatibility level of the database back to a supported version (110) and make sure your user has db_owner checked it will work.

For some reason even if you have all the administrator permissions or read/write/execute etc., the key is to still have db_owner checked.

Hope this helps.

Thank you for letting us know, Benjamin,

As you may be aware, Microsoft SQL Server 2016 is not fully supported for any version of Confluence at this time, but I'm happy you were able to find a workaround.

As well the user should have full access:

For any users that happen upon this and would like to see full MS SQL 2016 support, you can watch and vote on this case:

Kind regards,

Shannon

This widget could not be displayed.

When I tried to setup Confluence with Cloudflare infront of it, I got this error everytime. Because Cloudflare timesout the requests before they are finished, causing the setup procress to fail. When I did the setup on localhost first, then switched it over to the live URL it worked out!

This widget could not be displayed.

I'm experiencing the exact same error before even reaching the step where I select a DB.

The server starts up and in my browser I've entered the product key for evaluation and then I hit this error.

(I have MySQL 5.7 installed ready to use, but I'm not even at this step yet).

Chris,

It's likely a different issue from what the other users are experiencing. You'll still want to take a look at your logs to see what errors are occurring. 

Can you let us know what version of Confluence you're running and what errors are in the logs?

Shannon

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

470 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you