No path available to succesful database upgrade
Asked by ksvv:

Hello,

I have been trying to upgrade our Confluence-server installation 6.15.9 to a newer one without success. The problem seems to be that it's somehow running on Postgresql 9.2, even though the 6.15.9 version shouldn't even support it.

postgres=# SELECT version();  
version  
---------------------------------------------------------------------------------------------------------------  
PostgreSQL 9.2.24 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit

If I even re-attempt to install the same version with the same fresh database with the currently installed version of postgresql 9.2, the installation fails after the wizard is establishing the database connection (database test is succesful).

Also removing Postgresql 9.2 and installing 9.6 and doing a fresh install for 6.15.9 with the postgresql 9.6, the installation fails.

I will attach the log of that installation try to the bottom of this message.

I have also made a new server with Centos 8 and installed postgresql 9.6 version to there. Still while trying to install the version 6.15.9, the installation fails with the same type of error-messages after the database setup in the wizard.

However, using the same server (Centos 8) and the same database Postgresql 9.6 but installing Confluence 7.11 instead of 6.15.9 and it works without problems. The problem here is that I have no idea how I could migrate my data from the old installation to this new installation, because the instructions for upgrade paths do not include (or I haven't been able to find the right one) a way to upgrade Confluence this way.

So I am left out of ideas how to proceed with the upgrade. Could you offer advice how to proceed?

----------------------------LOG-------------------------

logo System Error  
A system error has occurred --- our apologies!

For immediate troubleshooting, consult our knowledge base for a solution.

If you would like to receive support from Atlassian's support team, ask your Confluence administrator to create a support issue on Atlassian's support system with the following information:

a description of your problem and what you were doing at the time it occurred  
a copy of the error and system information found below  
a copy of the application logs (if possible).  
Your Confluence administrator can use the support request form to create a support ticket which will include this information.

We will respond as promptly as possible.  
Thank you!

Return to site homepage...

Cause  
java.lang.RuntimeException: javax.servlet.ServletException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResources' in class com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup at /decorators/setup.vmd\[line 9, column 25\]  
at com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:37)

caused by: javax.servlet.ServletException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResources' in class com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup at /decorators/setup.vmd\[line 9, column 25\]  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$ErrorSendingErrorHandlingStrategy.handleException(ConfluenceSitemeshDecorator.java:244)

caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResources' in class com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup at /decorators/setup.vmd\[line 9, column 25\]  
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)

caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: java.lang.IllegalStateException: Container is not setup  
at com.atlassian.spring.container.LazyComponentReference.create(LazyComponentReference.java:41)

Stack Trace:\[hide\]  
java.lang.RuntimeException: javax.servlet.ServletException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResources' in class com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup at /decorators/setup.vmd\[line 9, column 25\]  
at com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:37)  
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:84)  
at com.atlassian.confluence.util.profiling.ProfilingSiteMeshFilter.doFilter(ProfilingSiteMeshFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.confluence.util.profiling.ConfluenceActivityFilter.doFilter(ConfluenceActivityFilter.java:39)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:57)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:45)  
at com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.jmx.JmxFilter.doFilter(JmxFilter.java:97)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.cache.TransactionalCacheFactoryCleanupFilter.doFilter(TransactionalCacheFactoryCleanupFilter.java:22)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:17)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.UserLoggingContextFilter.doFilter(UserLoggingContextFilter.java:32)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.UserNameHeaderFilter.doFilter(UserNameHeaderFilter.java:25)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.MauEventFilter.doFilterInternal(MauEventFilter.java:31)  
at com.atlassian.confluence.web.filter.AbstractStaticResourceAwareFilter.doFilter(AbstractStaticResourceAwareFilter.java:43)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:39)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.ConfluenceTimeoutFilter.doFilter(ConfluenceTimeoutFilter.java:57)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:88)  
at com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.applyFilter(ConfluenceSecurityFilter.java:40)  
at com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.doFilter(ConfluenceSecurityFilter.java:29)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:25)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:103)  
at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:35)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:57)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:45)  
at com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:56)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)  
at com.atlassian.confluence.web.filter.ConfluenceOpenSessionInViewFilter.doFilterInternal(ConfluenceOpenSessionInViewFilter.java:41)  
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:37)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:31)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:38)  
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:31)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.confluence.web.filter.HttpRequestStatsFilter.doFilter(HttpRequestStatsFilter.java:47)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:121)  
at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:92)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.confluence.web.filter.ConfluenceTimingFilter.doFilter(ConfluenceTimingFilter.java:46)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)  
at com.atlassian.confluence.extra.webdav.servlet.filter.WebdavRequestForwardFilter.doFilter(WebdavRequestForwardFilter.java:72)  
at com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:29)  
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:57)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:45)  
at com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.tenant.TenantGateFilter.lambda$doFilter$0(TenantGateFilter.java:35)  
at com.atlassian.confluence.tenant.TenantGate$3.call(TenantGate.java:145)  
at com.atlassian.confluence.tenant.TenantGateFilter.doFilter(TenantGateFilter.java:37)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:36)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.internal.web.filter.spring.IgnoreWebAsyncManagerFilter.doFilter(IgnoreWebAsyncManagerFilter.java:59)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:51)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:39)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:39)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.lambda$doFilter$3(VCacheRequestContextFilter.java:44)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:87)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:71)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.doFilter(VCacheRequestContextFilter.java:43)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:33)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:59)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.github.kristofa.brave.servlet.BraveServletFilter.doFilter(BraveServletFilter.java:59)  
at com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:52)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:25)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:59)  
at com.atlassian.confluence.web.ConfluenceJohnsonFilter.doFilter(ConfluenceJohnsonFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.setup.ConfluenceEncodingFilter.doFilterInternal(ConfluenceEncodingFilter.java:35)  
at com.atlassian.confluence.web.filter.AbstractStaticResourceAwareFilter.doFilter(AbstractStaticResourceAwareFilter.java:43)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:37)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.internal.diagnostics.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:42)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)  
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)  
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)  
at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:206)  
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)  
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)  
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)  
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)  
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)  
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)  
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)  
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)  
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)  
at java.lang.Thread.run(Thread.java:748)  
Caused by: javax.servlet.ServletException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResources' in class com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup at /decorators/setup.vmd\[line 9, column 25\]  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$ErrorSendingErrorHandlingStrategy.handleException(ConfluenceSitemeshDecorator.java:244)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$StreamingResponseWritingStrategy.renderToResponse(ConfluenceSitemeshDecorator.java:300)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.applyDecoratorUsingVelocity(ConfluenceSitemeshDecorator.java:214)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.applyDecorator(ConfluenceSitemeshDecorator.java:147)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.renderInternal(ConfluenceSitemeshDecorator.java:135)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.lambda$render$0(ConfluenceSitemeshDecorator.java:107)  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.render(ConfluenceSitemeshDecorator.java:105)  
at com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:33)  
... 228 more  
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResources' in class com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup at /decorators/setup.vmd\[line 9, column 25\]  
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)  
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)  
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)  
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)  
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)  
at org.apache.velocity.Template.merge(Template.java:328)  
at org.apache.velocity.Template.merge(Template.java:235)  
at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:68)  
at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:76)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$StreamingResponseWritingStrategy.renderToResponse(ConfluenceSitemeshDecorator.java:291)  
... 235 more  
Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)  
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)  
at com.atlassian.confluence.plugin.webresource.ConfluenceWebResourceIntegration.isDeferJsAttributeEnabled(ConfluenceWebResourceIntegration.java:224)  
at com.atlassian.plugin.webresource.impl.config.Config.isDeferJsAttributeEnabled(Config.java:1269)  
at com.atlassian.plugin.webresource.assembler.DefaultWebResourceSet.writeFormattedResources(DefaultWebResourceSet.java:144)  
at com.atlassian.plugin.webresource.assembler.DefaultWebResourceSet.writeHtmlTags(DefaultWebResourceSet.java:129)  
at com.atlassian.plugin.webresource.WebResourceManagerImpl.writeIncludedResources(WebResourceManagerImpl.java:229)  
at com.atlassian.plugin.webresource.WebResourceManagerImpl.writeIncludedResources(WebResourceManagerImpl.java:194)  
at com.atlassian.plugin.webresource.WebResourceManagerImpl.getRequiredResources(WebResourceManagerImpl.java:158)  
at com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.getResources(DefaultConfluenceWebResourceManager.java:154)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)  
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)  
at com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:24)  
at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:28)  
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)  
... 243 more  
Caused by: java.lang.IllegalStateException: Container is not setup  
at com.atlassian.spring.container.LazyComponentReference.create(LazyComponentReference.java:41)  
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)  
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)  
at com.atlassian.confluence.plugin.webresource.ConfluenceWebResourceIntegration.isDeferJsAttributeEnabled(ConfluenceWebResourceIntegration.java:224)  
at com.atlassian.plugin.webresource.impl.config.Config.isDeferJsAttributeEnabled(Config.java:1269)  
at com.atlassian.plugin.webresource.assembler.DefaultWebResourceSet.writeFormattedResources(DefaultWebResourceSet.java:144)  
at com.atlassian.plugin.webresource.assembler.DefaultWebResourceSet.writeHtmlTags(DefaultWebResourceSet.java:129)  
at com.atlassian.plugin.webresource.WebResourceManagerImpl.writeIncludedResources(WebResourceManagerImpl.java:229)  
at com.atlassian.plugin.webresource.WebResourceManagerImpl.writeIncludedResources(WebResourceManagerImpl.java:194)  
at com.atlassian.plugin.webresource.WebResourceManagerImpl.getRequiredResources(WebResourceManagerImpl.java:158)  
at com.atlassian.confluence.plugin.webresource.DefaultConfluenceWebResourceManager.getResources(DefaultConfluenceWebResourceManager.java:154)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)  
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)  
at com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:24)  
at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:28)  
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)  
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)  
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)  
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)  
at org.apache.velocity.Template.merge(Template.java:328)  
at org.apache.velocity.Template.merge(Template.java:235)  
at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:68)  
at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:76)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$StreamingResponseWritingStrategy.renderToResponse(ConfluenceSitemeshDecorator.java:291)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.applyDecoratorUsingVelocity(ConfluenceSitemeshDecorator.java:214)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.applyDecorator(ConfluenceSitemeshDecorator.java:147)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshErrorDecorator.renderInternal(ConfluenceSitemeshErrorDecorator.java:45)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.render(ConfluenceSitemeshDecorator.java:115)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshErrorDecorator.render(ConfluenceSitemeshErrorDecorator.java:37)  
at com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:33)  
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:84)  
at com.atlassian.confluence.util.profiling.ProfilingSiteMeshFilter.doFilter(ProfilingSiteMeshFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:51)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:45)  
at com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:39)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:88)  
at com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.applyFilter(ConfluenceSecurityFilter.java:40)  
at com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.doFilter(ConfluenceSecurityFilter.java:29)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:51)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:45)  
at com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:51)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:45)  
at com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:59)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:54)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)  
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)  
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)  
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)  
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)  
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:394)  
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:253)  
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:175)  
... 12 more

<br />

Referer URL  
Unknown


Answers:
author: ksvv
body: I managed to upgrade the database successfully by using these instructions as a baseline, with some additional changes: <https://altinukshini.wordpress.com/2018/05/03/upgrade-postgres-9-2-to-9-6-in-centos-7-bold-lines/>

For anybody trying this, please note that you shouldn't do anything before backing up all your data, and ensuring you have a way to restore confluence to the point before any changes were made.

Most important change of all was to the original instructions was to modify my database which was collate and ctype "C" and encoding of "ASCII" to UTF8, before trying to even upgrade the database from 9.2 to 9.6. You can check your databases by logging to postgre user (CentOS7):

sudo -i -u postgres

and executing the following commands:

psql

\\l

I did this via pg_dumpall and then restoring the dump after dropping the database and creating it anew with UTF8 settings. You should test that your Confluence works normally after the procedure, before moving forward with anything else (assuming that your database was set to "C" and "ASCII" as well).

After the change to the database I committed the commands found below. Maybe these will be of use to somebody.

sudo -i -u postgres

pg_dumpall \> backup.sql_confluensedb.20210929

su root

cp backup.sql_confluensedb.20210929 \~/  
systemctl stop postgresql  
/etc/init.d/confluence stop  
mv /usr/bin/pg_ctl{,-orig}  
echo '#!/bin/bash' \> /usr/bin/pg_ctl  
echo '"$0"-orig "${@/unix_socket_directory/unix_socket_directories}"' \>\> /usr/bin/pg_ctl  
chmod +x /usr/bin/pg_ctl

sudo -i -u postgres

rm -rf /var/lib/pgsql/9.6/data/\*

/usr/pgsql-9.6/bin/initdb --encoding=UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 -D /var/lib/pgsql/9.6/data/  
netstat -tlpn  
##########/usr/pgsql-9.6/bin/pg_ctl -D /var/lib/pgsql/9.6/data -l logfile start

<br />

\\c confluencedb  
DROP DATABASE postgres;

CREATE DATABASE postgres LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8' ENCODING 'UTF8' TEMPLATE template0 OWNER postgres;

(SOURCE FOR TEMPLATE CHANGES: <https://www.shubhamdipt.com/blog/how-to-change-postgresql-database-encoding-to-utf8/>)

UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';  
DROP DATABASE template1;  
CREATE DATABASE template1 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8' ENCODING 'UTF8' TEMPLATE template0;

<br />

/usr/pgsql-9.6/bin/pg_upgrade --old-datadir /var/lib/pgsql/data/ --new-datadir /var/lib/pgsql/9.6/data/ --old-bindir /usr/bin/ --new-bindir /usr/pgsql-9.6/bin/

(as root)  
systemctl start postgresql-9.6  
mv -f /usr/bin/pg_ctl{-orig,}

(as postgres)  
./analyze_new_cluster.sh  
./delete_old_cluster.sh  
psql --version  
WRONG VERSION FOR NOW, LETS FIX THAT:

(as root)  
systemctl disable postgresql  
yum remove postgresql  
systemctl enable postgresql-9.6  
find / -name "\*.bash_profile.rpmsave\*"  
mv /var/lib/pgsql/.bash_profile.rpmsave /var/lib/pgsql/.bash_profile

vim /var/lib/pgsql/.bash_profile  
ADD LINE TO END:  
export PATH=$PATH:/usr/pgsql-9.6/bin

Log out and back in to postgres user  
psql --version

-bash-4.2$ psql  
psql: could not connect to server: No such file or directory  
Is the server running locally and accepting  
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?  

netstat -tlpn  
FOR SOME REASON running on port 5433

SOLUTION:

UNCOMMENT "port = 5432" line from:  
vim /var/lib/pgsql/9.6/data/postgresql.conf

systemctl restart postgresql-9.6

-bash-4.2$ psql  
psql (9.6.23)  
Type "help" for help.

postgres=#

postgres=# \\l  
List of databases  
Name \| Owner \| Encoding \| Collate \| Ctype \| Access privileges  
--------------+------------------+----------+-------------+-------------+---------------------------------------  
confluencedb \| confluencedbuser \| UTF8 \| en_US.UTF-8 \| en_US.UTF-8 \| confluencedbuser=CTc/confluencedbuser+  
\| \| \| \| \| postgres=CTc/confluencedbuser +  
\| \| \| \| \| =Tc/confluencedbuser  
postgres \| postgres \| UTF8 \| en_US.UTF-8 \| en_US.UTF-8 \|  
template0 \| postgres \| UTF8 \| en_US.UTF-8 \| en_US.UTF-8 \| =c/postgres +  
\| \| \| \| \| postgres=CTc/postgres  
template1 \| postgres \| UTF8 \| en_US.UTF-8 \| en_US.UTF-8 \| =c/postgres +  
\| \| \| \| \| postgres=CTc/postgres  
(4 rows)

postgres=#


author: Pavel Junek
body: Hi,

You can try this Atlassian KB - [Confluence does not start due to Spring Application context has not been set](https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html) .

I recommend you take another look at [Confluence Supported Platforms](https://confluence.atlassian.com/conf615/supported-platforms-967338803.html)

Pavel

comments: author: ksvv
body: Hi,

I actually went through that checklist and double checked all of those without it changing anything. The 6.15.9 installation wizard still always fails to the database initiation phase, no matter if I use the existing installation of Postgres 9.2, or an updated one to 9.6. And then magically when using Confluence 7.11 installer it works just fine with Postgre 9.6 version.

Anyway I will do the checklist again and get back to this matter. I will probably have the time to do the checklist next week.

-Mikko


Tags: confluence-server

server