Configure Kafka JMX ports

Learn more about Kafka JMX ports, including primary and ephemeral ports, and how to configure them.

Kafka JMX uses multiple ports for communication. A primary port and ephemeral ports for Remote Method Invocation (RMI) registry and Java Remote Method Protocol (JRMP) communication. All ports are visible in netstat -anp output, but the ephemeral ports used for JMX are not easily identifiable as they are not fixed port numbers. All of these ports can be configured through the Kafka service's Configuration tab in Cloudera Manager.

  • The JMX_PORT configuration maps to com.sun.management.jmxremote.port by default.

    To access JMX via JConsole, run jconsole ${BROKER_HOST}:9393

  • You can change the number for the RMI registry port by adding an argument similar to the following to the Additional Broker Java Options property in Cloudera Manager.
    -Dcom.sun.management.jmxremote.rmi.port=port
  • You can control the JRMP port by adding an argument similar to the following to the Additional Broker Java Options property in Cloudera Manager.
    -Dcom.sun.management.jmxremote.local.port=port