tchiotludo / akhq

Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more...
https://akhq.io/
Apache License 2.0
3.4k stars 657 forks source link

Couldn't find any clusters on your configuration file #106

Closed gusyuwhe closed 5 years ago

gusyuwhe commented 5 years ago

Hi! I'm testing with a confluent cluster with name "test".

My config looks like this but it says no cluster is found. Could anyone take a look at the config? Thanks

  connections:
    test: # url friendly name for the cluster (letter, number, _, -, ... dot are not allowed here)
      properties: # standard kafka properties (optional)
        bootstrap.servers: "xyz.aws.confluent.cloud:9092"
      schema-registry:
        url: "abc.aws.confluent.cloud" # schema registry url (optional)
        basic-auth: # Basic Auth user / pass
          username: schema-registry-api-key
          password: schema-registry-api-secret
tchiotludo commented 5 years ago

Hi, your configuration look fine. Do you have the kafkahq: base on your yaml, like :

kafkahq:
  connections:
    test: # url friendly name for the cluster (letter, number, _, -, ... dot are not allowed here)
      properties: # standard kafka properties (optional)
        bootstrap.servers: "xyz.aws.confluent.cloud:9092"
      schema-registry:
        url: "abc.aws.confluent.cloud" # schema registry url (optional)
        basic-auth: # Basic Auth user / pass
          username: schema-registry-api-key
          password: schema-registry-api-secret

?

gusyuwhe commented 5 years ago

Hi! Yes I have. The rest of the config is as same as the example.

tchiotludo commented 5 years ago

Ok

gusyuwhe commented 5 years ago

here's the log, https://gist.github.com/GusPr/3b217a827b8eadf33f85e7fc660c029c I use the latest jar.

tchiotludo commented 5 years ago

Do you try with absolute path ? I'm not really aware of windows but I think the path must be absolute

gusyuwhe commented 5 years ago

With absolute path, I get nullPointerException, https://gist.github.com/GusPr/41ab2dd1fe608d73184e8c1cccd64adb

tchiotludo commented 5 years ago

your url is weird: /docker-kafka-server/topic. Since your config is test (friendly name) the url must be /test/topic

gusyuwhe commented 5 years ago

my localhost:8080 got redirected to there automatically. When visiting /test/topic, the browser hangs and no new logs

gusyuwhe commented 5 years ago

It stopped after my last comment, org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.

tchiotludo commented 5 years ago

Ok seems better now. For the redirection, It was save in cache by your browser (you must have try with config name docker-kafka-server). For the timeout, seems that you don't have direct access to cluster from your computer. Try to see if port if open.

gusyuwhe commented 5 years ago

For the redirection, It was save in cache by your browser (you must have try with config name docker-kafka-server).

That's correct, I did

For the timeout, seems that you don't have direct access to cluster from your computer. Try to see if port if open.

The cluster is up running on confluent cloud.

tchiotludo commented 5 years ago

I'm talking reachable from your local desktop. A timeout mean that the port is not open ( maybe network restrictions from confluent cloud or your local network)

gusyuwhe commented 5 years ago

Hello, sorry for a late reply.

Yes, I could produce some data locally and they show up in confluent cloud.

tchiotludo commented 5 years ago

Just try with confluent cloud, and it work with on dev env since last bug fix (https://github.com/tchiotludo/kafkahq/issues/111)

Just add this configuration :

kafkahq:
  connections:
    {{url-friendly-name}}:
      properties:
        bootstrap.servers: "{{host}}.gcp.confluent.cloud:9092"
        security.protocol: SASL_SSL
        sasl.mechanism: PLAIN
        sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="{{host}}" password="{{password}}";

Does this works now for you ?

gusyuwhe commented 5 years ago

Tried

kafkahq:
  connections:
    test: # url friendly name for the cluster (letter, number, _, -, ... dot are not allowed here)
      properties: # standard kafka properties (optional)
        bootstrap.servers: "xyz.aws.confluent.cloud:9092"
        security.protocol: SASL_SSL
        sasl.mechanism: PLAIN
        sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="API-key" password="API-secret";
      schema-registry:
        url: "abc.aws.confluent.cloud" # schema registry url (optional)
        basic-auth: # Basic Auth user / pass
          username: schema-registry-api-key
          password: schema-registry-api-secret

https://gist.github.com/GusPr/62644f456b063f9fdcd64a9a6925ed95

tchiotludo commented 5 years ago

It's exactly just the bug I've fix on #111, don't you have try the dev version ?

To get it :

with docker docker pull tchiotludo/kafkahq:dev

or get the latest jar

docker pull tchiotludo/kafkahq:dev
docker run --rm --name=kafkahq -it tchiotludo/kafkahq:dev
docker cp kafkahq:/app/kafkahq.jar . 
gusyuwhe commented 5 years ago

Works 👍

One question, what was the reason that topics could not have - or _ in the names?

tchiotludo commented 5 years ago

Are you talking about topic name or url friendly name of the cluster ?

gusyuwhe commented 5 years ago

Sorry, cluster

tchiotludo commented 5 years ago

ok comment is wrong Just "." dot for now don't work "-" & "_" are allowed

gusyuwhe commented 5 years ago

Great!