a364176773 commented on PR #12898:
URL: https://github.com/apache/kafka/pull/12898#issuecomment-1331580521

   > @a364176773 from the JDK issue you linked, it doesn't seem like the 
private RMI port should have any implications in firewalled environments:
   > 
   > > The additional port is for the RMI registry of the local only server. 
This port is used only for connecting locally and does not need to be traversed 
through firewalls.
   > 
   > Has this not been your experience? Can you shed some light on how the fix 
proposed here has helped you run/monitor Kafka better?
   
   I am using oracle jdk8_333 version, if I deploy under docker and use -v to 
map jmx port, because jdk will randomize a port number for rmi when jmx port is 
opened and rmi port is not specified, at this time, using tools like jmxterm 
will not be able to connect successfully because the protocol is using rmi, and 
rmi port is not The port of rmi is not open to the outside world. So in order 
to reduce the user's learning cost and improve usability, the rmi port and jmx 
port should be set to the same
   
   example:
   ```
   JMXServiceURL jmxServiceURL = new 
JMXServiceURL(String.format("service:jmx:rmi:///jndi/rmi://%s:%s/jmxrmi", 
brokerIp, port));
   JMXConnector connector = JMXConnectorFactory.connect(jmxServiceURL, null)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to