Confluence installation throw an error : "Confluence is vacant, a call to tenanted is not allowed."
Asked by zegro:

Hi

I'm trying to install Confluence 6.10.0 on my centos server but I always get an error during database initialization:

```
ERROR [http-nio-30801-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 org.hibernate.Session org.hibernate.SessionFactory.getCurrentSession() throws org.hibernate.HibernateException] is not allowed.
```

I tried to install using installer, tar.gz archive with postgres-9.5 and mysql-5.7 all combinations give me this error.

The Hostname can be resolved to an IP address.

the confluence.log

```
ERROR [http-nio-30801-exec-4] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
 -- referer: http://127.0.0.1:30801/setup/setupdbtype-start.action | url: /setup/setupdbtype.action | traceId: 003442f362ddc903 | userName: anonymous
java.util.concurrent.CompletionException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedTransactionManager' defined in class path resource [databaseSubsystemContext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedLocalSessionFactoryBean5' defined in class path resource [productionDatabaseContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: premature SessionFactory initialisation, Hibernate properties have not yet been persisted in confluence.cfg.xml

ERROR [http-nio-30801-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 org.hibernate.Session org.hibernate.SessionFactory.getCurrentSession() throws org.hibernate.HibernateException] is not allowed.
```

I would appreciate all help.

I didn't have any problems installing JIRA on the same server.  


Answers:
author: AnnWorley
body: Hi Frank,

The entry from your log that stands out for me is:

```
Hibernate properties have not yet been persisted in confluence.cfg.xml
```

Please make sure the CentOS user running Confluence has the file system permissions needed to write to the confluence.cfg.xml file in the root of the [Confluence home directory](https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html) (and to the rest of that dir as well).

If you delete the confluence.cfg.xml file, and restart Confluence, the setup wizard will start over when you pull up Confluence in the browser.

I look forward to hearing how it goes.

Thanks,

Ann

comments: author: zegro
body: Thank you Ann for the suggestion.

according to [Confluence Home directory](https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html?_ga=2.259800074.1071201258.1531030585-1543328251.1530872356&_gac=1.56166873.1531101206.CjwKCAjw7IbaBRBqEiwA6AyZghwHOekWluv-TmU7pZN3j5TEYPeOHBG1YRRPY0lCqWpAaLL4uIU8PxoCzycQAvD_BwE "Confluence Home directory")

I had re-checked again, It seems that setting is quite all right.

then i delete the confluence.cfg.xml file and restart confluence, begin to re-set.

The only difference is that I turned off the local ShadowSockes-VPN.?My confluence runs on a remote server?  
that solves it?

It's hard to understand that local VPN could affect remote services.

I want to try again using docker to install confluence later.

Thank you so much!


author: Sascha Ernst
body: I just saw the same error after playing around with the log4j.properties.

During this I caused a typo in the filename (log4.properties =\> missing j) and this caused (for whatever reason) the "confluence is vacant" error.

After correcting the filename, confluence started again without any problem.


Tags: confluence-server

server