Created
September 27, 2016 13:53
-
-
Save atrepca/c3e811d6cc6529992a7281d6dcdd54be to your computer and use it in GitHub Desktop.
Kafka Systemd Service Configuration File for Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Apache Kafka server (broker) | |
Documentation=http://kafka.apache.org/documentation.html | |
Requires=network.target remote-fs.target | |
After=network.target remote-fs.target | |
[Service] | |
Type=simple | |
PIDFile=/var/run/kafka.pid | |
User=kafka | |
Group=kafka | |
ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties | |
ExecStop=/opt/kafka/bin/kafka-server-stop.sh | |
Restart=on-failure | |
SyslogIdentifier=kafka | |
[Install] | |
WantedBy=multi-user.target |
I'm using this successfully for Kafka version 0.11.0.0 on Ubuntu 16.04.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Above is not working for kafka, but working for zookeeper.
I made it work for kafka by updating below line,
Requires=kafka.service
And remove, 'After=....'