Confluence generates Confluence is vacant error on install
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
The following appears in the atlassian-confluence.log
and catalina.out.
atlassian-confluence.log
1
2015-09-09 16:41:24,964 ERROR [http-nio-8090-exec-4] [[Standalone].[localhost].[/].[jsp]] log Servlet.service() for servlet jsp threw exception com.atlassian.confluence.tenant.VacantException: Confluence is vacant, a call to tenanted [public abstract net.sf.hibernate.connection.ConnectionProvider net.sf.hibernate.engine.SessionFactoryImplementor.getConnectionProvider()] is not allowed.
Diagnosis
Environment
A cleanly installed Linux operating system
The hostname does not resolve to an IP address, this can be confirmed by running (here the machine's hostname is
ubuntu
).1 2
$ ping `cat /etc/hostname` ping: unknown host ubuntu
Diagnostic Steps
Install a clean Linux virtual machine
Add a hostname into
/etc/hostname
or viasudo hostname <hostname>
remove hostname from
/etc/hosts
if it exists so it only has1
127.0.0.1 localhost
Install the latest Confluence
Run
<confluence_install>/bin/start-confluence.sh
Open the homepage in a browser
Select Trial version
Select No add-ons
Enter the trial license key
At this point, the error appears in the logs. The error will appear with other classes if an external database is used or other options provided, however, the Confluence is vacant
is consistent.
Cause
The hostname
does not resolve to an IP address.
Solution
Resolution
This issue can be fixed by confirming that hostname can be resolved to an IP address.
Do one of the following:
Edit
/etc/hosts
and add the hostname1
127.0.0.1 localhost <hostname>
Add the hostname to the DNS
To confirm the hostname resolves to an IP address, ping the hostname (here, hostname is ubuntu
).
1
2
3
4
$ ping `cat /etc/hostname`
PING ubuntu (127.0.1.1) 56(84) bytes of data.
64 bytes from somepc (127.0.1.1): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from somepc (127.0.1.1): icmp_seq=2 ttl=64 time=0.041 ms
Additional Notes
In some cases, the error can be like following,
1
2
2018-03-06 15:42:15,612 ERROR [http-nio-6641-exec-3] [[Standalone].[localhost].[/c641].[noop]] log Servlet.service() for servlet [noop] in context with path [/c641] threw 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.
Which just shows that Confluence is unable to connect to its database. Further analysis of the atlassian-confluence.log
will highlight other reasons for this error.
This error can also appear if the encoding of the database is not set correctly. If you suspect that this is the case, check the documentation for your database system:
Was this helpful?