Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2601

ConsoleProducer tool shows stacktrace on invalid command parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.8.2.1
    • None
    • tools

    Description

      Running kafka-console-producer tool with an invalid argument shows a full stack trace instead of a user-friendly error:

      vagrant@vagrant-ubuntu-trusty-64:/vagrant/kafka/kafka_2.9.1-0.8.2.1$ bin/kafka-console-producer.sh --zookeeper localhost:2181 --topic another-topic
      Exception in thread "main" joptsimple.UnrecognizedOptionException: 'zookeeper' is not a recognized option
              at joptsimple.OptionException.unrecognizedOption(OptionException.java:93)
              at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:402)
              at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:55)
              at joptsimple.OptionParser.parse(OptionParser.java:392)
              at kafka.tools.ConsoleProducer$ProducerConfig.<init>(ConsoleProducer.scala:216)
              at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:35)
              at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)
      

      Attachments

        Activity

          People

            GabrielNicolasAvellaneda Gabriel Nicolas Avellaneda
            GabrielNicolasAvellaneda Gabriel Nicolas Avellaneda
            Guozhang Wang Guozhang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: