question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kafka-manager requires manual config to find cluster

See original GitHub issue

Running kafka-manager on an existing kafka cluster using the following command:

kafka-manager/bin/kafka-manager -Dconfig.file=../../configs/application.conf

This allows me to access the kafka-manager via web browser but no clusters are preconfigured even though I gave the manager the ZK host:port in the cfg file. I have to manually “Add Cluster” from the web interface, only providing a custom name and “localhost:2181” under ZK host.

I need this automated. I’m surprised this isn’t done already, I already provide it the zkhost:port in the config file (below). Perhaps it needs a name in order to create the cluster and that’s not provided in the config file?

The application.conf is as follows:

play.crypto.secret=${?APPLICATION_SECRET}
play.i18n.langs=["en"]
play.http.requestHandler = "play.http.DefaultHttpRequestHandler"
play.application.loader=loader.KafkaManagerLoader
kafka-manager.zkhosts="localhost:2181"
kafka-manager.zkhosts=${?ZK_HOSTS}
pinned-dispatcher.type="PinnedDispatcher"
pinned-dispatcher.executor="thread-pool-executor"
application.features=["KMClusterManagerFeature","KMTopicManagerFeature","KMPreferredReplicaElectionFeature","KMReassignPartitionsFeature"]
akka {
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  loglevel = "INFO"
}
basicAuthentication.enabled=false
basicAuthentication.username="admin"
basicAuthentication.password="password"
basicAuthentication.realm="Kafka-Manager"```

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:7
  • Comments:14

github_iconTop GitHub Comments

10reactions
etotheipicommented, Jun 10, 2016

Thanks @sheepkiller, that’s exactly what I needed.

Note that I needed to use ${KM_URL}/clusters to submit the POST action, but otherwise it was exactly as you said:

curl localhost:9000/clusters --data "name=primarycluster&zkHosts=localhost:2181&kafkaVersion=0.9.0.1" -X POST

6reactions
sonnygcommented, May 4, 2018

Just to add to this conversation…

I came here looking for this exact functionality, and while the examples here did not work, I was eventually able to add a cluster entry. I wanted to post my process here for others to try.

I am running firefox developer edition, but this should work with other browsers as well. Also, I am running kafka-manager inside a docker container, localhost:9000.

  1. Browse to localhost:9000/addCluster
  2. Open the developer tools
  3. select the network tab (may need to select “persist logs”)
  4. Complete the form with your desired values, submit
  5. In developer tools, select the network tab
  6. Find the POST call
  7. Right click on the entry and select Copy > Copy cURL (or Copy POST DATA)
  8. Create a new script (I created a .sh script), and paste (or create) the curl command

If this doesn’t work the first time, you can redirect the output to an html file. Open the html file in a browser and you can see which form entries failed.

In my scenario:

./create-cluster.sh > results.html

Then I would open results.html in a browser to see which form field was invalid, looking for entries with “This field is required” next to them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cluster Management using Kafka Manager Tutorial - YouTube
Learn what Kafka Manager is! Learn how to manage Clusters using Kafka Manager ! ... Get the Apache Kafka Series - Kafka Cluster...
Read more >
How to create a cluster in Kafka Manager using cURL
Kafka Manager is a handy tool to check the status of Kafka topics. ... Because Kafka Manager requires manual cluster creation and that's...
Read more >
Journey of Apache Kafka & Zookeeper Administrator ( Part 5 )
This playbook will install Kafka Manager aka CMAK as mentioned in the ... Once install is done via Ansible or Manually, We need...
Read more >
Kafka manager configuration issue in kafka cluster
You can run sbt in offline mode by setting below parameter: $ sbt "set offline := true" run. And make sure you have...
Read more >
Kafka 3.3 Documentation
3.1 Broker Configs; 3.2 Topic Configs; 3.3 Producer Configs; 3.4 Consumer Configs ... 6.2 Datacenters; 6.3 Geo-Replication (Cross-Cluster Data Mirroring).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found