Our company's confluence suddenly went down and doesn't wanna open without any update or any change
Asked by Nouiere J?rvinen:

this is what i get when i try to access our confluence :

HTTP Status 500 -- Internal Server Error {#toc-hId--1238997332}
---------------------------------------------------------------

*** ** * ** ***

**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.tenant.TenantGate.lambda$throwVacantExceptionOnMethodCall$0(TenantGate.java:188)	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)	com.sun.proxy.$Proxy72.getCurrentSession(Unknown Source)	sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	java.lang.reflect.Method.invoke(Method.java:498)	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)	com.sun.proxy.$Proxy72.getCurrentSession(Unknown Source)	org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:369)	org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:350)	org.springframework.orm.hibernate5.HibernateTemplate.get(HibernateTemplate.java:470)	org.springframework.orm.hibernate5.HibernateTemplate.get(HibernateTemplate.java:462)	com.atlassian.confluence.user.rememberme.DefaultConfluenceRememberMeTokenDao.findById(DefaultConfluenceRememberMeTokenDao.java:28)	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	java.lang.reflect.Method.invoke(Method.java:498)	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.$Proxy163.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.confluence.util.AbstractBootstrapHotSwappingFilter$SwapOnBootstrapFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:55)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	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:109)	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:59)	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 {#toc-hId--548435858}


Answers:
author: Nic Brough -Adaptavist-
body: The most common cause of this is that the server Confluence is running on cannot resolve its own name.

See <https://confluence.atlassian.com/confkb/confluence-generates-confluence-is-vacant-error-on-install-779164449.html> for a full description and fix for that.

comments: author: Nouiere J?rvinen
body: i have two issues why this is not working for me here : this didn't happen during installation we had been using confluence for years and this is a problem that encountred suddenly during night/morning today , second "he `hostname` does not resolve to an IP address." our hostname DOES resolve to an IP address


author: Nic Brough -Adaptavist-
body: Is the ip address that the server resolves (not your machine, not a client, the actual Confluence server) the Confluence server? Just want to check that, I've recently seen this caused by a miskey in a DNS server setting.

The other two things that may cause this error (it's almost always the ip address) are

* an inability for the user running the Confluence service to read and write it's own files - specifically the server.xml and the properties files in the classes directory. Check the ownership and permissions of the installation and data directores
* The server is unable to reach the database for some reason


Tags: confluence-server

server