Why AMQ log shows InstanceAlreadyExistsException error after AMQ Home is changed
Issue
- I changed to AMQ_HOME folder after server launched. Before I make the change, I stop the AMQ process and make sure no Java process is running. After that, I moved all the files under
$AMQ_HOMEand try to restart AMQ under the new folder and see below errors:
2019-12-06 10:43:58,392 | ERROR | AMQ-2-thread-1 | BrokerService | he.activemq.broker.BrokerService 616 | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630283 | Failed to start Apache ActiveMQ (amq, null)
javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=amq
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)[:1.8.0_201]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)[:1.8.0_201]
2019-12-06 10:43:58,395 | WARN | JMX connector | ManagementContext | q.broker.jmx.ManagementContext$1 158 | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630283 | Failed to start JMX connector Cannot bind to URL [rmi://localhost:2099/jmxrmi]: javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]. Will restart management to re-create JMX connector, trying to remedy this issue.
I have checked there is no other process occupying port 2099 before I restart AMQ. When I try to stop the AMQ by exiting the Karaf console, below error is occurred:
JBossA-MQ:karaf@root> exit
Exception in thread "Thread-112" java.lang.RuntimeException
at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.update_pool_state(ActiveMQServiceFactory.java:460)
at io.fabric8.mq.fabric.ActiveMQServiceFactory$2.run(ActiveMQServiceFactory.java:258)
Caused by: java.lang.NullPointerException
at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.update_pool_state(ActiveMQServiceFactory.java:452)
... 1 more
I checked this KCS but it does not related to my case.
Environment
- Red Hat AMQ
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.