yahoo / CMAK

CMAK is a tool for managing Apache Kafka clusters
Apache License 2.0
11.81k stars 2.5k forks source link

Kafka manager api command to create cluster is rendering HTML instead of creating the cluster #515

Open vigneshsenapathy opened 6 years ago

vigneshsenapathy commented 6 years ago

Hey guys,

I am trying to automate some part of creating cluster everytime in my environment. I am trying to use the API post endpoint point /clusters but its not working.

Curl command:

curl -u test:test -H "Content-Type: application/json" --data @test.json -X POST http://kafka-manager:9000/clusters

test.json:

{ "name": "tresting", "version": "1.0.0", "curatorConfig": "zk01.test", "jmxEnabled": true, "pollConsumers": true, "filterConsumers": false, "jmxUser": "None", "jmxPass": "None", "jmxSsl": false, "tuning": "Option(kafkaManagerContext.get.getKafkaManager.defaultTuning)", "securityProtocol": "PLAINTEXT", "activeOffsetCacheEnabled": true, "logkafkaEnabled": false, "displaySizeEnabled": false }

All i get is the HTML back. please let me know if there is something i am doing wrong in getting this to work. This is important as we restart zookeepers and kafka a lot to clean it up and want to have kafka manager all the clusters when its restarted

Thanks,

Vignesh

murong00 commented 6 years ago

you can ref #244, bombompb's guidance worked out for me.