3

my kafka-manager can't update consumer information and keeps the removed consumer groups list, so i try to restart kafka-manager. (i'm using kafka-manager 1.3.3.22 and kafka 2.12-2.1.1)

but README.md in kafka-manager and /bin/kafka-manager command doesn't appear to provide stop/restart.

is there any way to safely restart or terminate kafka-manager? without 'kill -9 PID' commend

Junhaeng Heo
  • 105
  • 1
  • 7
  • I don't think there is a provision to restart kafka manager out of the box. I see these open issues: https://github.com/yahoo/CMAK/issues/205 and https://github.com/yahoo/CMAK/issues/562 – Madhu Bhat May 29 '20 at 08:56
  • thank, your comment!! Without some safy way. i should run 'kill -9 PID_OF_KAFKA_MANAGER' and 'rm ./kafka-manager-1.3.3.22/RUNNING_PID' and then run kafka-manager with ./kafka-manager-1.3.3.22/bin/kafka-manager i think it is not safe way.... – Junhaeng Heo May 29 '20 at 09:03
  • Probably you can use docker compose – Giorgos Myrianthous May 29 '20 at 09:09
  • current my service is running with VM environment without docker.. (we will plan to transfer it to docker but not now.) – Junhaeng Heo May 29 '20 at 09:21

1 Answers1

3

There is no restart command out of the box however, you can run Kafka Manager as a service.


Firstly, create the service file under /etc/systemd/system/kafka-manager.service and add the following content:

[Unit]
Description=Kafka Manager
After=network.target

[Install]
WantedBy=multi-user.target

[Service]
ExecStart=/opt/kafka-manager-1.3.3.22/bin/kafka-manager
Type=simple

In /opt/kafka-manager-1.3.3.22/conf/application.conf:

play.crypto.secret="some-secret"
play.http.requestHandler="play.http.DefaultHttpRequestHandler"
play.application.loader=loader.KafkaManagerLoader
pinned-dispatcher.type="PinnedDispatcher"
pinned-dispatcher.executor="thread-pool-executor"
kafka-manager.zkhosts="my-zookeeper-connection-string"
kafka-manager.base-zk-path="/a-chroot"

In /opt/kafka-manager-1.3.3.22/conf/application.ini:

-Dapplication.home=/opt/kafka-manager-1.3.3.22
-Dpidfile.path=/opt/kafka-manager-1.3.3.22/kafka-manager.pid
-Dhttp.port=8080

and finally run

systemctl daemon-reload
systemctl enable kafka-manager --now

Start the service

systemctl start kafka-manager.service

Stop the service

systemctl stop kafka-manager.service

Restart the service

systemctl restart kafka-manager.service
Madhu Bhat
  • 13,559
  • 2
  • 38
  • 54
Giorgos Myrianthous
  • 36,235
  • 20
  • 134
  • 156