Confluence generates Confluence is vacant error on install
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
The following appears in the
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.
- 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
$ ping `cat /etc/hostname` ping: unknown host ubuntu
- Install a clean Linux virtual machine
- Add a hostname into
sudo hostname <hostname>
remove hostname from
/etc/hostsif it exists so it only has
- Install the latest Confluence
- 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.
hostname does not resolve to an IP address.
This issue can be fixed by confirming that hostname can be resolved to an IP address.
Do one of the following:
/etc/hostsand add the hostname
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
$ 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
In some cases, the error can be like following,
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.