Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kafka Systemd Service Configuration File for Ubuntu 16.04
[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
@johncornelius091

This comment has been minimized.

Copy link

johncornelius091 commented Sep 26, 2018

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=....'

@atrepca

This comment has been minimized.

Copy link
Owner Author

atrepca commented Nov 19, 2019

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
You can’t perform that action at this time.