I use Spring Boot with embedded Active-MQ as JMS-Provider and it works quite well but: I need to run multiple instances on one host. When I start the second instance I get the following error:
2018-12-17 17:23:25.498 WARN 11042 --- [JMX connector] o.a.a.broker.jmx.ManagementContext : Failed to start JMX connector Cannot bind to URL [rmi://localhost:1099/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.
This is of course because port 1099 is already used by the first instance. Sadly I really dont find a way to change this port using any spring.activemq.* property or an instance of ActiveMQConnectionFactoryCustomizer. Can anyone help me?
Best regards, Dominic
Do you even need jmxrmi? You can disable it with (at least for one of your instances):
org.apache.activemq.broker.jmx.createConnector=false
(in application.properties or with VM argument -Dorg.apache.activemq.broker.jmx.createConnector=false)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.