I am with CentOS 7, and I want to start Kafka standalone producer (File Connector) as a service. The command is:

/opt/kafka/bin/connect-standalone.sh /opt/kafka/config/connect-standalone.properties /opt/kafka/config/connect-file-source.properties

And, obviously, it has no stop command. Normally, I just Ctrl+C to stop it as a foreground process.

But when I test, I found very tedious to open several terminal console session to run several processes (Zookeeper, Kafka server, Kafka producer, Storm jar, etc.) so I change Zookeeper and Kafka server as service, which have their stop script. But in this case, no.

I tried systemctl start kafka-producer and systemctl stop kafka-producer, but the service entered failed status, and is not stopped. I had to delete the service, reload the daemon, and switch to manual again.


Description=Kafka Producer

ExecStart=/opt/kafka/bin/connect-standalone.sh /opt/kafka/config/connect-standalone.properties /opt/kafka/config/connect-file-source.properties


Anyway to manipulate a service without ExecStop command?


Having HDP 2.6.4 with Kafka 0.10.1 installed, the script reported

/usr/hdp/$ ./connect-standalone.sh
USAGE: ./connect-standalone.sh [-daemon] connect-standalone.properties

a property to run as daemon by using the option -daemon.

Would this something feasible for you?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.