How to specify JMX port to use in Kafka 0.9/0.10 and not run into port conflict when running any of the command line commands?
<p>First off, I'm not sure if this issue exists in the standard Kafka packaging. I'm using Kafka as packaged by Hortonworks in HDP 2.4</p>

<p>In HDP 2.3 and Kafka 0.8.2, I export JMX_PORT=9999 in Kafka environment /etc/kafka/conf/kafka-env.sh. All command line commands such /usr/hdp/current/kafka-broker/bin/kafka-topics.sh work fine.</p>

<p>Not so in HDP 2.4 and Kafka 0.9 or in HDP 2.5 and Kafka 0.10. No matter which port I set JMX_PORT to, any of the commands throw the following error:</p>

<p>Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 9999; nested exception is:
        java.net.BindException: Address already in use</p>