[ https://issues.apache.org/jira/browse/KAFKA-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Ing resolved KAFKA-2889. ------------------------------ Resolution: Fixed Fix Version/s: (was: 0.9.0.0) I should not have reported this issue. Your shell scripts are working fine and there is nothing for you to fix. The problem was based on an outer layer of shell script which I did not even describe in this bug report. Basically, the arguments "-daemon server.properties" were being passed as a single string rather than 2 separate arguments. > Problem running Kafka using -daemon switch > ------------------------------------------ > > Key: KAFKA-2889 > URL: https://issues.apache.org/jira/browse/KAFKA-2889 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 0.9.0.0, 0.8.2.2 > Environment: Ubuntu 14.04 TLS > Reporter: David Ing > Labels: newbie > Fix For: 0.8.2.2 > > Original Estimate: 3h > Remaining Estimate: 3h > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)