Confluence 6.7.3 Initial setup Failed with 500 error
Asked by Felix Anim-Botwe:

Hello All,

I have been trying to setup Confluence for a client in AWS but I have ran into several issues with no solution. Below is the error

HTTP Status 500 - Unable to register MBean \[com.atlassian.confluence.jmx.TaskQueueWrapper@48b43fba\] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue {#toc-hId-1817549875}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**type** Exception report

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

**description** ++The server encountered an internal error that prevented it from fulfilling this request.++

**exception**

```
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.atlassian.confluence.jmx.TaskQueueWrapper@48b43fba] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue	org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:625)	org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:550)	org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:432)	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792)	org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)	org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)	org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)	com.atlassian.config.spring.BootstrappedContainerContext.refresh(BootstrappedContainerContext.java:22)	com.atlassian.confluence.tenant.TenantedContainerContext.refresh(TenantedContainerContext.java:24)	com.atlassian.confluence.setup.actions.AbstractSetupAction.lambda$transitionFromColdToVacantState$0(AbstractSetupAction.java:152)	java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)	com.atlassian.confluence.tenant.TenantGate$3.call(TenantGate.java:145)	com.atlassian.confluence.setup.actions.AbstractSetupAction.transitionFromColdToVacantState(AbstractSetupAction.java:159)	com.atlassian.confluence.setup.actions.SetupDBTypeAction.setupDatabase(SetupDBTypeAction.java:83)	com.atlassian.confluence.setup.actions.AbstractDatabaseCreationAction.execute(AbstractDatabaseCreationAction.java:36)	com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)	com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)	com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)	com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:33)	com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)	com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)	
```

**root cause**

```
javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue	com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)	com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)	com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)	com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)	com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)	com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)	org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)	org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:678)	org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:621)	
```

**note** ++The full stack trace of the root cause is available in the Apache Tomcat/8.0.51 logs.++


Answers:
author: Brant Schroeder
body: Felix,

I believe that this is a permissions issue. Check and make sure that the files in the confluence home directory are created by the owner of the directory. If not change the owner. Someone had a similar problem in this thread. <https://community.atlassian.com/t5/Confluence-questions/Confluence-Server-install-in-Docker-falure/qaq-p/458625>

If it is not a permissions issue then it could be JMX but I bet it is permissions. <https://confluence.atlassian.com/confkb/unable-to-start-confluence-due-to-jmx-182158269.html?_ga=2.219498393.1840931089.1528731559-890520517.1523892346>