How to connect to a remote Karaf instance using JConsole

For this post I’m using Apache Karaf 2.3.5 running on Java 7u60.

In order to connect to a remote Karaf instance you have to pass a service URL. Its format is defined in the etc/ configuration file:


The rmiServerHost and rmiRegistryHost variables should be changed to the hostname or IP address of the remote Karaf instance (or localhost if it’s on the same machine). The default values of the rest of the parts together with the name of the files containing them are shown in the following table:

Variable Default value Configuration file
rmiServerPort 44444 etc/
rmiRegistryPort 1099 etc/ root etc/

So a complete URL with default values looks like service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root.

When creating a new JMX connection in JConsole you should enter the service URL and the credentials. Default username and password are karaf/karaf. They are defined in the etc/ configuration file.