[ https://issues.apache.org/jira/browse/KAFKA-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14333188#comment-14333188 ]
Jonathan Rafalski commented on KAFKA-1680: ------------------------------------------ I understand what you are saying here and usually I would agree that if we have default working values for all arguments we should be able to run the tool with no actual args, but in the case the "default" value for the JMX-URL will never work as it doesn't even specify a host name in the URL and the port number used is random. For a user to turn on remote JMX on their JVM they need to specifically feed the remote option when kicking off the JVM explicitly giving the hostname and port they want to use to allow remote connections. Since there is no default for a JVM that will auto turn on remote JMX on a default port, a default value for this JMX tool's URL cannot be considered a valid default setting and really is only there to prevent an exception when run without it. In my opinion if you believe we SHOULD give a default value and allow running with no args then we should change the default value to have the hostname of the local machine and then output a message saying that no JMX URL was given and then print the default value that was used. This would allow the user to properly troubleshoot why it might not be working and/or turn on JMX on their local using our default values so it would work. > JmxTool exits if no arguments are given > --------------------------------------- > > Key: KAFKA-1680 > URL: https://issues.apache.org/jira/browse/KAFKA-1680 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8.2.0 > Reporter: Ryan Berdeen > Assignee: Ewen Cheslack-Postava > Priority: Minor > Labels: newbie > Attachments: KAFKA-1680.patch > > > JmxTool has no required arguments, but it exits if no arguments are provided. > You can work around this by passing a non-option argument, which will be > ignored, e.g.{{./bin/kafka-run-class.sh kafka.tools.JmxTool xxx}}. > It looks like this was broken in KAFKA-1291 / > 6b0ae4bba0d0f8e4c8da19de65a8f03f162bec39 -- This message was sent by Atlassian JIRA (v6.3.4#6332)