You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Liquan Pei (JIRA)" <ji...@apache.org> on 2016/05/20 22:38:12 UTC
[jira] [Assigned] (KAFKA-3742) Can't run connect-distributed with
-daemon flag
[ https://issues.apache.org/jira/browse/KAFKA-3742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liquan Pei reassigned KAFKA-3742:
---------------------------------
Assignee: Liquan Pei
> Can't run connect-distributed with -daemon flag
> -----------------------------------------------
>
> Key: KAFKA-3742
> URL: https://issues.apache.org/jira/browse/KAFKA-3742
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.10.0.0
> Reporter: Geoff Anderson
> Assignee: Liquan Pei
> Priority: Minor
>
> Running on deb package install on ubuntu 14.04. Discovered while experimenting various different kafka components.
> This error probably applies to other scripts as well.
> Running connect-distributed thusly
> {code}connect-distributed -daemon /tmp/connect-distributed.properties{code}
> gives errors like this
> {code}
> root@worker1:/home/vagrant# connect-distributed -daemon /tmp/connect-distributed.properties
> Exception in thread "main" java.io.FileNotFoundException: -daemon (No such file or directory)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:146)
> at java.io.FileInputStream.<init>(FileInputStream.java:101)
> at org.apache.kafka.common.utils.Utils.loadProps(Utils.java:446)
> at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:61)
> {code}
> Note that this runs:
> connect-distributed /tmp/connect-distributed.properties -daemon
> However, the daemon flag is not activated in this case
> Underlying cause:
> kafka-run-class assumes -daemon comes before the classpath
> The scripts for which -daemon works use something like
> {code}
> EXTRA_ARGS="-name kafkaServer -loggc"
> COMMAND=$1
> case $COMMAND in
> -daemon)
> EXTRA_ARGS="-daemon "$EXTRA_ARGS
> shift
> ;;
> *)
> ;;
> esac
> exec $base_dir/kafka-run-class $EXTRA_ARGS io.confluent.support.metrics.SupportedKafka "$@"
> {code}
> but connect-distributed does this:
> {code}
> exec $(dirname $0)/kafka-run-class org.apache.kafka.connect.cli.ConnectDistributed "$@"
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)