Confluence Server install in Docker falure
Asked by admin@thequestion.ru:

Hi!

I try to install Confluence Server in Docker. I tried as official image and also unofficial one. Problem is the same - failure on database step.

Steps to reproduce:

\* install container

\* make port 8005 accessible outside the server nginx (I guess could be replaced to any other reverse-proxy server)

\* Visit main page http://..../

\* Choose Trial install

\* Check Confluence QA and Calendar

\* Enter Confluence trial license key

\* Choose DB options: Direct JDBC, database credentials

\* Press "Next"

\* Pages starts to load, but process takes toooo long. Then HTTP timeout gets exhausted, so I see 504 error page.

\* When I check database I can see tables created by confluence - so DB was well available to Confluence installer.

\* Next I wait until CPU usage of Confluence container goes down.

\* I try to reload the installation page in browser and get error (see below pls)

How can I install Confluence to Docker?

```
HTTP Status 500 - Unable to register MBean [com.atlassian.confluence.jmx.TaskQueueWrapper@1dc0b1c9] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueuetype Exception reportmessage Unable to register MBean [com.atlassian.confluence.jmx.TaskQueueWrapper@1dc0b1c9] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueuedescription The server encountered an internal error that prevented it from fulfilling this request.exceptioncom.atlassian.config.ConfigurationException: Unable to register MBean [com.atlassian.confluence.jmx.TaskQueueWrapper@1dc0b1c9] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue	com.atlassian.confluence.setup.actions.AbstractSetupAction.transitionFromColdToVacantState(AbstractSetupAction.java:161)	com.atlassian.confluence.setup.actions.SetupStandardDatabaseAction.setupDatabase(SetupStandardDatabaseAction.java:46)	com.atlassian.confluence.setup.actions.AbstractDatabaseCreationAction.execute(AbstractDatabaseCreationAction.java:36)
        ..... skipped .....	The full stack trace of the root cause is available in the Apache Tomcat/8.0.41 logs.
```


Answers:
author: Chuck Solie
body: I had a similar error starting with a local persistant directory/my_local_path_to/confluence-home :

docker run -v /my_local_path_to/confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server

I noticed that the files in that directory were being created with a user/group that was different from the owner of the directory ('bin' in my case).

i resolved by:

docker stop confluence

docker rm confluence

\\rm -R /my_local_path_to/confluence-home/\*

chown -R bin:bin /my_local_path_to/confluence-home

docker run -v /my_local_path_to/confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server

And it came up correctly. Hope this helps

comments: author: Travis Moran
body: To add to the above

I'm using Ubuntu 16.04 LTS

chown -R bin:bin \<data folder\> does solve the issue in this instance but that could change based on OS(guid).

Confluence Container user+id:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/25857i9AF60464FC5F546F/image-size/large?v=v2&px=999 "image.png")

Host system user+id:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/25858i4421F39F24AB50DA/image-size/large?v=v2&px=999 "image.png")


author: Edwin Kyalangalilwa
body: Stop Confluence, Delete all files under

```
<confluence-home>/bundled-plugins<confluence-home>/plugins-cache<confluence-home>/plugins-osgi-cache<confluence-home>/plugins-temp<confluence-home>/bundled-plugins_language
```

Make sure the user running Confluence has read/write permissions on the Confluence home directory.

Restart Confluence


author: AnnWorley
body: I found a knowledgebase article that addresses an error like the one you are reporting:

[Unable to Start Confluence Due to JMX](https://confluence.atlassian.com/confkb/unable-to-start-confluence-due-to-jmx-182158269.html)

The suggestion in the article is to disable the JMX registration process via a configuration file attached to the article.


Tags: docker

install

timeout