Setup Database Failed
Asked by Fourth Peach:

I got a wired issue which I dont have last week when I try to install confluence on aws EC2 server

Last time I did it successfully installed, but now I would like to host it in a different server in another AWS region

I am running Ubuntu 16.04 LTS

with AWS RDS postgres 10.4 (actually I tried many version like 9.4/ 9.6)

install process went through, and I can get the setup page through http://myip:8090

then I try to init setup db, "test connect" success, then it took 2 mins-ish to setup db.

then I got 500 ....

if I try to refresh the page, it shows like already data in db, and then if I click the button which I forgot the name but something like 'resolve the data'

I got this:

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

*** ** * ** ***

**Type** Exception Report

**Message** Unable to register MBean \[com.atlassian.confluence.jmx.TaskQueueWrapper@7b45c58b\] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue

**Description** The server encountered an unexpected condition that prevented it from fulfilling the request.

**Exception**

```
com.atlassian.config.ConfigurationException: Unable to register MBean [com.atlassian.confluence.jmx.TaskQueueWrapper@7b45c58b] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue	com.atlassian.confluence.setup.actions.AbstractSetupAction.transitionFromColdToVacantState(AbstractSetupAction.java:162)	com.atlassian.confluence.setup.actions.SetupDBTypeAction.setupDatabase(SetupDBTypeAction.java:82)



```

I tried install many times, same thing happened.. please help me with it


Answers:
author: Stephen Sifers
body: Hello Fourth,

Setting up Confluence should be a simple process and errors on setup are very uncommon. I don't believe your database is the primary issue here.

Just to ensure you're database was setup correctly. Can you please let us know how the database was configured?

Here is an example of configuring the database via CLI:

```
createuser -S -d -r -P -E confuser
createdb --owner confuser --encoding utf8 confluence
```

Your error above is related to a JMX issue which may be resolved with the following:
>
> Cause {#toc-hId-1850534088}
> ---------------------------
>
> JMX (Java Management eXtensions) is a technology for monitoring and managing Java applications. JMX uses objects called MBeans (Managed Beans) to expose data and resources from your application. Some services require JMX and it can prevent Confluence from starting. In the example above, it was due to a GMail Server configuration without a GMail reference in server.xml or confluence.xml.
>
> *Please ensure that you are not running multiple Atlassian applications in a single Tomcat container. See* [*Can Multiple Atlassian Products Be Deployed in a Single Tomcat Container?*](https://confluence.atlassian.com/confkb/can-multiple-atlassian-products-be-deployed-in-a-single-tomcat-container-218279174.html) *for more information.*
>
> Resolution {#toc-hId--701622873}
> --------------------------------
>
> It's possible that this is a one-time occurrence and may not require disabling JMX. If you find that the issue persists upon a second effort, continue with the resolution below.
>
> If you experience any problems during Confluence startup that are related to JMX, it is possible to disable the JMX registration process. Please place [jmxContext.xml](https://confluence.atlassian.com/confkb/files/182158269/182092028/1/1237846175672/jmxContext.xml) in your \<confluence-install\>/confluence/WEB-INF/classes folder to do so. A restart of Tomcat will be required.

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

Something else to be aware of are the [Supported Platforms](https://confluence.atlassian.com/doc/supported-platforms-207488198.html) of the Atlassian products. PostgreSQL 10.4 is not among those supported platforms. PostgreSQL 9.4 - 9.6 are supported.

Please let us know if this helps to resolve the issue.

Regards,  
Stephen Sifers


Tags: confluence-server

server