Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
4.2.4
-
None
-
None
Description
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.
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)
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.
First with default port 44444 as configuration is null.
Second with configured port now configuration is not null.
It doesn't have specific impact on execution.
Attachments
Issue Links
- is duplicated by
-
KARAF-6386 Race condition in initialization of Activators (Port already in use: 1099)
- Resolved