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?

2 answers

0 vote

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

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

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

355 views 20 10
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