Hello,

I want to harden the default installations and reduce the
needed port footprints. karaf-magement adds a RMI Registry
and a RMI Server for the JMX Connector.

I noticed that I can turn off to create or locate a RMI
registry. And when I do so, also the RMI Server seems not
to be exported. So this is good, however I doubt its
intentional since I get on the console exceptions from the
JMXConnector:

karaf@root()> Exception in thread "JMX Connector Thread
[service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root]"
java.lang.RuntimeException: Could not start JMX connector server
at
org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:438)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: Cannot bind to URL
[rmi://127.0.0.1:1099/karaf-root]: javax.naming.ServiceUnavailableException
[Root exception is java.rmi.ConnectException: Connection refused to host:
127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect]
at
java.management.rmi/javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:854)
at
java.management.rmi/javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:501)
at
org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:421)
... 1 more

So what would be the right setting? In the code I see no
obvious program flow to manage this.

Ideally I think I would be fine with only registering it
on the platform MBeans Server or an own local one. 

Am I correct that no normal karaf lifecycle commands use
the JMX method for that?

Gruss
Bernd
-- 
https://bernd.eckenfels.net

Reply via email to