Unable to Start Confluence Due to JMX
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Confluence is unable to start. A message in the logs appears like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2009-03-23 15:12:25,990 ERROR [http-8080-Processor22] [ContainerBase.[Catalina].[localhost].[/confluence]] filterStart Exception starting filter jmx
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.atlassian.confluence.jmx.JmxSMTPMailServer@1415036[id=1234215073649,name=Gmail SMTP Server,description=<null>,server name=aspmx.l.google.com,username=aaaaa,password=bbbbb,isSessionServer=false,defaultFrom=cordawiki@corda.com,prefix=[localhost],smtpPort=25]] with object name [Confluence:name=MailServer-Gmail SMTP Server]; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailServer-Gmail SMTP Server
Caused by: javax.management.InstanceAlreadyExistsException: Confluence:name=MailServer-Gmail SMTP Server
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:162)
at org.springframework.jmx.export.MBeanExporter.registerManagedResource(MBeanExporter.java:431)
at com.atlassian.confluence.jmx.MBeanExporterWithUnregisterImpl.registerManagedResource(MBeanExporterWithUnregisterImpl.java:93)
at com.atlassian.confluence.jmx.JmxFilter.registerObject(JmxFilter.java:164)
at com.atlassian.confluence.jmx.JmxFilter.doMailServer(JmxFilter.java:87)
at com.atlassian.confluence.jmx.JmxFilter.registerBeans(JmxFilter.java:63)
at com.atlassian.confluence.jmx.JmxFilter.init(JmxFilter.java:42)
Or:
1
2
3
4
5
org.springframework.jmx.export.MBeanExportException: Could not create ModelMBean for managed resource [com.atlassian.confluence.jmx.RequestMetrics@f3a5a5] with key 'com.atlassian.confluence.jmx.RequestMetrics'; nested exception is java.lang.IllegalArgumentException: Null Map
at org.springframework.jmx.export.MBeanExporter.createAndConfigureMBean(MBeanExporter.java:705)
caused by: java.lang.IllegalArgumentException: Null Map
at javax.management.ImmutableDescriptor.<init>(ImmutableDescriptor.java:85)
Cause
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. SeeCan Multiple Atlassian Products Be Deployed in a Single Tomcat Container?for more information.
Resolution
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 using the following steps:
Copy and save the following code block as
jmxContext.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:atl="http://www.atlassian.com/schema/atlassian-spring" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd http://www.atlassian.com/schema/atlassian-spring http://www.atlassian.com/schema/atlassian-spring/atlassian.xsd"> <bean id="exporter" class="com.atlassian.confluence.jmx.MBeanExporterWithUnregisterImpl"> <property name="beans"> <map> <entry key="Confluence:name=MailTaskQueue"> <bean class="com.atlassian.confluence.jmx.TaskQueueWrapper"><constructor-arg ref="mailTaskQueue"/></bean> </entry> <entry key="Confluence:name=IndexingStatistics"> <bean class="com.atlassian.confluence.jmx.JmxIndexManagerWrapper"><constructor-arg ref="indexManager"/></bean> </entry> <entry key="Confluence:name=SchedulingStatistics"> <bean class="com.atlassian.confluence.jmx.JmxScheduledTaskWrapper"><constructor-arg ref="scheduler"/></bean> </entry> <entry key="Confluence:name=SystemInformation"> <bean class="com.atlassian.confluence.jmx.JmxSystemInfoWrapper"><constructor-arg ref="systemInformationService"/></bean> </entry> </map> </property> <property name="exposeManagedResourceClassLoader" value="true"/> <property name="enabled" value="false"/> </bean> </beans>
Save jmxContext.xml in your <confluence-install>/confluence/WEB-INF/classes folder
Restart Confluence
Was this helpful?