Cannot connect to Fuse ESB using JConsole?

Solution Verified - Updated -

Issue

Cannot connect to Fuse ESB using JConsole?

The servicemix container will not accept a JMX Connection?

Resolution

JAAS Authentication is enabled by default on the jmx connector.
Try connecting with the default username/principal of 'smx' and password 'smx' to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi.
Alternatively you can disable authentication by editing /conf/jmx.xml as follows:

      <!-- Comment the following lines to disable JAAS authentication for jmx  -->
      <!--entry key="jmx.remote.authenticator">
        <sm:jmxJaasAuthenticator authenticationService="#authenticationService"/>
      </entry -->

If you are experiencing a problem making a remote JMX connection to a Linux server check the following items:

1) Run the following command:

hostame -i

If it reports 127.0.0.1, JConsole will not be able to connect to the JVM running on that Linux machine. To fix this issue, edit /etc/hosts so that the hostname resolves to the host address.

2) Verify the firewall is not blocking the connection. This can be done by running the following command:

iptables -L -v

If you see a default policy configured on the INPUT to drop packets unless they match one of the configured rules then you will need to add a rule to allow connections to be made on the current RMI port.

Chain INPUT (policy DROP 0 packets, 0 bytes)

If your firewall was configured as above with a default policy to drop packets for example, you would need to run the following command to add a rule to allow the connection:

iptables -I INPUT -s jconsole-host -p tcp --destination-port jmxremote-port -j ACCEPT

Where jconsole-host is either the hostname or the host address on which JConsole runs on and jmxremote-port is the port number set for com.sun.management.jmxremote.port for remote management.

To make the above changes persist a reboot the following command should be run:

/sbin/service iptables save

If you are connecting remotely through a firewall on Linux:

The com.sun.management.jmxremote.port management property specifies the port where the RMI Registry can be reached but the ports where the RMIServer and RMIConnection remote objects are exported is chosen by the RMI stack. To export the remote objects (RMIServer and RMIConnection) on a given port you need to create your own RMI connector server programmatically, as described in the section Mimicking Out-of-the-Box Management Using the JMX Remote API in the Java SE Monitoring and Management Guide. You must specify the JMXServiceURL as follows:

    JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost:" + port1 + "/jndi/rmi://localhost:" + port2 + "/jmxrmi");

In the command above, port1 is the port number on which the RMIServer and RMIConnection remote objects are exported and port2 is the port number of the RMI Registry.

http://docs.oracle.com/javase/6/docs/technotes/guides/management/faq.html#linux1

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.