Julien Greffe created KARAF-6534:
------------------------------------
Summary: Conflict with instances of Karaf for JMX connection
Key: KARAF-6534
URL: https://issues.apache.org/jira/browse/KARAF-6534
Project: Karaf
Issue Type: Bug
Components: karaf
Affects Versions: 4.2.4
Reporter: Julien Greffe
Hello,
when starting two karaf instances with different configurations in
{{etc/org.apache.karaf.management.cfg}} shows an error log on the secondly
started instance.
{code:java}
Exception in thread "JMX Connector Thread
[service:jmx:rmi://0.0.0.0:44444/jndi/rmi://:1099/karaf-root]"
java.lang.RuntimeException:
Port already in use: 44444;
You may have started two containers. If you need to start a second container
or the default ports are already in use update the config file
etc/org.apache.karaf.management.cfg and change the Registry Port and Server
Port to unused ports
at
org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:275)
at java.lang.Thread.run(Thread.java:748) {code}
Seems related to this line :
https://github.com/apache/karaf/blob/karaf-4.2.4/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java#L96
which is executed twice at the second instance startup.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)