cd /opt | |
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz | |
tar xvzf kafka_2.11-0.10.1.0.tgz | |
ln -s kafka_2.11-0.10.1.0/ kafka | |
vi /etc/systemd/system/kafka-zookeeper.service | |
[Unit] | |
Description=Apache Zookeeper server (Kafka) | |
Documentation=http://zookeeper.apache.org | |
Requires=network.target remote-fs.target | |
After=network.target remote-fs.target | |
[Service] | |
Type=simple | |
User=nano | |
Group=nano | |
Environment=JAVA_HOME=/usr/java/jdk1.8.0_102 | |
ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties | |
ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh | |
[Install] | |
WantedBy=multi-user.target | |
vi /etc/systemd/system/kafka.service | |
[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 kafka-zookeeper.service | |
[Service] | |
Type=simple | |
User=nano | |
Group=nano | |
Environment=JAVA_HOME=/usr/java/jdk1.8.0_102 | |
ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties | |
ExecStop=/opt/kafka/bin/kafka-server-stop.sh | |
[Install] | |
WantedBy=multi-user.target | |
vi kafka/config/server.properties | |
edit listeners propertie | |
listeners=PLAINTEXT://192.168.13.133:9092 | |
systemctl daemon-reload | |
systemctl start kafka-zookeeper.service | |
systemctl start kafka.service | |
Thanks :)
thank you
Thank you!!
Thank you :)
User=nano & Group=nano
There is no "nano" found.
Should I create login "nano" in /etc/passwd and group "nano" in /etc/group ?
User=nano & Group=nano
There is no "nano" found.
Should I create login "nano" in /etc/passwd and group "nano" in /etc/group ?
no
change it to your username
nano its just in my case
Thanks for posting this. I wonder how you add additional brokers to the service? Could you include an example of a service with 2 brokers?
the "http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz" is not found
you can choose the version available in the mirror by visiting this link: http://apache-mirror.rbc.ru/pub/apache/kafka/
thank you
thank you
Thx a lot!
is good, but if you are trying to setup a kafka broker in a remote machine were o only have a ssh conection to that machine, u should create another user and give him permissions to sudo, like explained in this guide:
https://www.digitalocean.com/community/tutorials/how-to-install-apache-kafka-on-ubuntu-20-04
kafka.service - Apache Kafka Server
Loaded: loaded (/etc/systemd/system/kafka.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-06-03 16:57:10 IST; 20s ago
Docs: http://kafka.apache.org/documentation.html
Process: 5376 ExecStart=/usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties (code=exited, status=1/FAILURE)
Main PID: 5376 (code=exited, status=1/FAILURE)
Jun 03 16:57:10 minal systemd[1]: Started Apache Kafka Server.
Jun 03 16:57:10 minal kafka-server-start.sh[5376]: Classpath is empty. Please build the project first e.g. by running './gradlew jar -PscalaVe
Jun 03 16:57:10 minal systemd[1]: kafka.service: Main process exited, code=exited, status=1/FAILURE
Jun 03 16:57:10 minal systemd[1]: kafka.service: Failed with result 'exit-code'.
server is not starting and I'm getting this response when I check kafka status
If you could help
thanks
very helpful, thank you so much!