Error 500 - Confluence is vacant
Asked by Krzysztof Kiser:

Hi,  

My Confluence was working fine and out of a sudden stopped. I am receiving the below error. Could anyone help me fix this please?

I am running Confluence on Windows, Confluence ver. 7.5.1

HTTP Status 500 -- Internal Server Error

Type Exception Report  
Message Confluence is vacant, a call to tenanted \[public abstract org.hibernate.Session org.hibernate.SessionFactory.getCurrentSession() throws org.hibernate.HibernateException\] is not allowed.  
Description The server encountered an unexpected condition that prevented it from fulfilling the request.  
Exception  
com.atlassian.confluence.tenant.VacantException: Confluence is vacant, a call to tenanted \[public abstract org.hibernate.Session org.hibernate.SessionFactory.getCurrentSession() throws org.hibernate.HibernateException\] is not allowed.  
com.atlassian.confluence.impl.tenant.TenantedProxyFactory.lambda$throwVacantExceptionOnMethodCall$3(TenantedProxyFactory.java:98)  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)  
com.sun.proxy.$Proxy68.getCurrentSession(Unknown Source)  
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
java.base/java.lang.reflect.Method.invoke(Unknown Source)  
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)  
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)  
com.sun.proxy.$Proxy68.getCurrentSession(Unknown Source)  
org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:370)  
org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:351)  
org.springframework.orm.hibernate5.HibernateTemplate.get(HibernateTemplate.java:471)  
org.springframework.orm.hibernate5.HibernateTemplate.get(HibernateTemplate.java:463)  
com.atlassian.confluence.user.rememberme.DefaultConfluenceRememberMeTokenDao.findById(DefaultConfluenceRememberMeTokenDao.java:28)  
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
java.base/java.lang.reflect.Method.invoke(Unknown Source)  
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)  
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)  
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)  
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)  
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)  
com.sun.proxy.$Proxy168.findById(Unknown Source)  
com.atlassian.seraph.service.rememberme.DefaultRememberMeService.getRememberMeCookieAuthenticatedUsername(DefaultRememberMeService.java:49)  
com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromCookie(DefaultAuthenticator.java:432)  
com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:332)  
com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:139)  
com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.applyFilter(ConfluenceSecurityFilter.java:40)  
com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.doFilter(ConfluenceSecurityFilter.java:29)  
com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:25)  
com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)  
com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:35)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)  
com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:49)  
com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)  
com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:57)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.confluence.web.filter.ConfluenceOpenSessionInViewFilter.doFilterInternal(ConfluenceOpenSessionInViewFilter.java:38)  
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)  
com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)  
com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:105)  
com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:37)  
com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:31)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:49)  
com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)  
com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)  
com.atlassian.confluence.util.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:36)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
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:32)  
com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:39)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71)  
com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:39)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.doFilter(VCacheRequestContextFilter.java:58)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:33)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:67)  
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:32)  
com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:59)  
com.atlassian.confluence.web.ConfluenceJohnsonFilter.doFilter(ConfluenceJohnsonFilter.java:32)  
com.atlassian.confluence.setup.ConfluenceEncodingFilter.doFilterInternal(ConfluenceEncodingFilter.java:35)  
com.atlassian.confluence.web.filter.AbstractStaticResourceAwareFilter.doFilter(AbstractStaticResourceAwareFilter.java:43)  
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)  
com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:37)  
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:32)  
Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/9.0.33


Answers:
author: Shannon S
body: Hello Krzysztof,

Thank you for raising this with us. If you are still encountering the issue at this time, we will need to know some more details about the situation in order to solve it.

1. When did you upgrade to Confluence 7.5.1, and what version did you come from?
2. What other configuration or actions have you taken to Confluence prior to this error?
3. When you review your atlassian-confluence.log file (see [Working with Confluence logs](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html)), is there any more information in the stack trace? Generally, the logs you see in the UI will be an abbreviated version, and in the Confluence log, you'll be able to find more information added to the end of that. It might start with "Caused by:" to let you know specifics.
4. What database version are you using?
5. Which JAVA version is Confluence using? (See [Change the Java vendor or version Confluence uses](https://confluence.atlassian.com/doc/change-the-java-vendor-or-version-confluence-uses-962342397.html) for information on how to check that.)

Based on the error message you provided, you're encountering the error in the article [Confluence generates Confluence is vacant error on install](https://confluence.atlassian.com/confkb/confluence-generates-confluence-is-vacant-error-on-install-779164449.html). This problem can occur if the hostname doesn't resolve to an IP.

You may also see this if your Confluence server was not able to access your database server. In this case, make sure the database server is accessible from your Confluence server, stop Confluence completely, and then restart. Tail your Confluence log to ensure that Confluence starts up properly.

I hope this helps, but let me know if you have any questions!

Take care,

Shannon

comments: author: Krzysztof Kiser
body: Hi Shannon, thank you for the response, however I needed to get access to my Confluence, therefore I tried to re-install Confluence. This did not help. I had to re-install Windows and it started working again.

Thanks


author: Shannon S
body: Hello,

Thank you for confirming that. Seems that it might've had an incorrect configuration and by reinstalling Windows, the issue resolved itself.

If you run into any issues again, please do let us know.

Shannon