Chapter 13. Configuring JMX
Changing the RMI port and JMX URL
Table 13.1. JMX Access Properties
|rmiRegistryPort||Specifies the RMI registry port. The default value is 1099.|
|serviceUrl||Specifies the the URL used to connect to the JMX server. The default URL is service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-KarafName, where |
Setting the JMX username and password
adminand the default password is
Troubleshooting on Linux platforms
- Check that the hostname resolves to the correct IP address. For example, if the
hostname -icommand returns 127.0.0.1, JConsole will not be able to connect to the JMX server. To fix this, edit the
/etc/hostsfile so that the hostname resolves to the correct IP address.
- Check whether the Linux machine is configured to accept packets from the host where JConsole is running (packet filtering is built in the Linux kernel). You can enter the command,
/sbin/iptables --list, to determine whether an external client is allowed to connect to the JMX server.Use the following command to add a rule to allow an external client such as JConsole to connect:
/usr/sbin/iptables -I INPUT -s JconsoleHost -p tcp --destination-port JMXRemotePort -j ACCEPTWhere JconsoleHost is either the hostname or the IP address of the host on which JConsole is running and JMXRemotePort is the IP port exposed by the JMX server.