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

Problem running Kafka using -daemon switch

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.2, 0.9.0.0
    • Fix Version/s: 0.8.2.2
    • Component/s: core
    • Labels:
    • Environment:
      Ubuntu 14.04 TLS
    • Flags:
      Patch

      Description

      I am seeing an error "USAGE: java [options] KafkaServer server.properties" when I try to start Kafka using the shell scripts that are provided inside kafka_2.10-0.8.2.2.tgz or kafka_2.11-0.8.2.2.tgz. Specifically I see this error when I use the "-daemon" flag as follows:

      kafka-server-start.sh -daemon /opt/companyName/kafka/config/server.properties

      This script then calls another script as follows:

      /opt/companyName/kafka/bin/kafka-run-class.sh -name kafkaServer -loggc kafka.Kafka -daemon /opt/companyName/kafka/config/server.properties

      This ultimately results in the call to java as follows:
      java -Xmx1G -Xms1G -server -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true -Xloggc:/opt/companyName/kafka/bin/../logs/kafkaServer-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/opt/companyName/kafka/bin/../logs -Dlog4j.configuration=file:/opt/companyName/kafka/bin/../config/log4j.properties -cp :/opt/companyName/kafka/bin/../core/build/dependant-libs-2.10.4*/.jar:/opt/companyName/kafka/bin/../examples/build/libs//kafka-examples.jar:/opt/companyName/kafka/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/opt/companyName/kafka/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/opt/companyName/kafka/bin/../clients/build/libs/kafka-clients*.jar:/opt/companyName/kafka/bin/../libs/jopt-simple-3.2.jar:/opt/companyName/kafka/bin/../libs/kafka_2.10-0.8.2.2.jar:/opt/companyName/kafka/bin/../libs/kafka_2.10-0.8.2.2-javadoc.jar:/opt/companyName/kafka/bin/../libs/kafka_2.10-0.8.2.2-scaladoc.jar:/opt/companyName/kafka/bin/../libs/kafka_2.10-0.8.2.2-sources.jar:/opt/companyName/kafka/bin/../libs/kafka_2.10-0.8.2.2-test.jar:/opt/companyName/kafka/bin/../libs/kafka-clients-0.8.2.2.jar:/opt/companyName/kafka/bin/../libs/log4j-1.2.16.jar:/opt/companyName/kafka/bin/../libs/lz4-1.2.0.jar:/opt/companyName/kafka/bin/../libs/metrics-core-2.2.0.jar:/opt/companyName/kafka/bin/../libs/scala-library-2.10.4.jar:/opt/companyName/kafka/bin/../libs/slf4j-api-1.7.6.jar:/opt/companyName/kafka/bin/../libs/slf4j-log4j12-1.6.1.jar:/opt/companyName/kafka/bin/../libs/snappy-java-1.1.1.7.jar:/opt/companyName/kafka/bin/../libs/zkclient-0.3.jar:/opt/companyName/kafka/bin/../libs/zookeeper-3.4.6.jar:/opt/companyName/kafka/bin/../core/build/libs/kafka_2.10*.jar kafka.Kafka -daemon /opt/companyName/kafka/config/server.properties

      Finally it generates the error:

      USAGE: java [options] KafkaServer server.properties

      This error prevents me from calling Kafka in -daemon mode unless I write my own shell script.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ing.dave@gmail.com David Ing
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified