Closed mrdvt92 closed 5 years ago
Kafka has to be able to connect to zookeeper, otherwise it won't work. Nevertheless, Zookeeper is a separate application, it's not a part of Kafka.
Zookeeper is a separate application, it's not a part of Kafka.
Then please remove the zookeeper parts from generated RPM or place in their own RPM.
$ rpm -qlp RPMS/x86_64/kafka-2.0.1-2.x86_64.rpm | grep zoo
/opt/kafka/bin/zookeeper-security-migration.sh
/opt/kafka/bin/zookeeper-server-start.sh
/opt/kafka/bin/zookeeper-server-stop.sh
/opt/kafka/bin/zookeeper-shell.sh
/opt/kafka/config/zookeeper.properties
/opt/kafka/libs/zookeeper-3.4.13.jar
Why would I do that? These files come with official Kafka distribution.
Zookeeper is a separate application, it's not a part of Kafka.
These files come with official Kafka distribution.
These statements. appear to me to be conflicting.
I'm no Kafka or Systemd expert but it appears logical that since you added the kafka.service that adding the zookeeper.service follows in the same spirit.
I have to agree with @mrdvt92. Either zookeeper is included or it isn't. There should be a zookeeper.service or the zookeeper files should not be included.
@virtualdxs @mrdvt92 zookeeper files are zookeeper client libraries, without them kafka will not be able to connect to zookeeper. It just happened that zookeeper client code and server code is shipped in the same jar file.
These files:
/opt/kafka/bin/zookeeper-server-start.sh
/opt/kafka/bin/zookeeper-server-stop.sh
Are clearly part of the zookeeper server. The zookeeper server is included in Kafka. I've opened #25 which makes all the changes needed to make zookeeper run and allow Kafka to start.
I had to add this file for zookeeper
` $ cat /etc/systemd/system/zookeeper.service [Unit] Requires=network.target remote-fs.target After=network.target remote-fs.target
[Service] Type=simple User=kafka ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh Restart=on-abnormal
[Install] WantedBy=multi-user.target
`
Based on information at https://www.vultr.com/docs/how-to-install-apache-kafka-on-centos-7