confluentinc / ksql

The database purpose-built for stream processing applications.
https://ksqldb.io
Other
122 stars 1.04k forks source link

Starting cli/server throws exception "Could not fetch broker information" #505

Closed jayixl closed 6 years ago

jayixl commented 6 years ago
$ ./bin/ksql-cli local --bootstrap-server xxx:9092
Initializing KSQL...
io.confluent.ksql.util.KsqlException: Could not fetch broker information. KSQL cannot initialize AdminCLient

I am exactly sure remote kafka server xxx:9092 is available.

Also, starting server-mode also failed:

$ ./bin/ksql-server-start config/ksqlserver.properties 
Exception in thread "main" io.confluent.ksql.util.KsqlException: Could not fetch broker information. KSQL cannot initialize AdminCLient.
        at io.confluent.ksql.util.KafkaTopicClientImpl.init(KafkaTopicClientImpl.java:188)
        at io.confluent.ksql.util.KafkaTopicClientImpl.<init>(KafkaTopicClientImpl.java:52)
        at io.confluent.ksql.rest.server.KsqlRestApplication.buildApplication(KsqlRestApplication.java:231)
        at io.confluent.ksql.rest.server.KsqlRestApplication.main(KsqlRestApplication.java:207)

and I have configure the same bootstrap-server in above properties file.

I found the issue from the build of both branch master and 4.0.x

miguno commented 6 years ago

What Kafka version is your broker running?

jayixl commented 6 years ago

@miguno I am using v0.10.2.1, which should be supported by latest streams-api (v1.0.0).

Pchelolo commented 6 years ago

Having the same issue with v0.11.0.1

ReasonDuan commented 6 years ago

Having the same issue with v0.10.2.0

ReasonDuan commented 6 years ago

This is my error log.

[2017-12-15 17:19:20,508] ERROR Failed to initialize TopicClient: org.apache.kafka.common.errors.UnsupportedVersionException: The broker does not support
DESCRIBE_CONFIGS (io.confluent.ksql.util.KafkaTopicClient:179)
Exception in thread "main" io.confluent.ksql.util.KsqlException: Could not fetch broker information. KSQL cannot initialize AdminCLient.
        at io.confluent.ksql.util.KafkaTopicClientImpl.init(KafkaTopicClientImpl.java:180)
        at io.confluent.ksql.util.KafkaTopicClientImpl.<init>(KafkaTopicClientImpl.java:53)
        at io.confluent.ksql.rest.server.KsqlRestApplication.buildApplication(KsqlRestApplication.java:231)
        at io.confluent.ksql.rest.server.KsqlRestApplication.main(KsqlRestApplication.java:206)
sd1ver commented 6 years ago

Having the same issue with v0.10.0.2

foreversunyao commented 6 years ago

Having the same issue with confluent-oss-4.0.0-2.11, and add debug info as bellow:

java.lang.Exception: TimeoutException: Timed out waiting for a node assignment.
    at org.apache.kafka.clients.admin.KafkaAdminClient$Call.fail(KafkaAdminClient.java:519)
    at org.apache.kafka.clients.admin.KafkaAdminClient$TimeoutProcessor.handleTimeouts(KafkaAdminClient.java:634)
    at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.timeoutNewCalls(KafkaAdminClient.java:706)
    at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:989)
    at java.lang.Thread.run(Thread.java:748)
[2017-12-21 12:24:53,530] DEBUG [AdminClient clientId=adminclient-1] Timed out 1 new calls. (org.apache.kafka.clients.admin.KafkaAdminClient:183)
[2017-12-21 12:24:53,530] ERROR Failed to initialize TopicClient: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. (io.confluent.ksql.util.KafkaTopicClient:187)
mts57017 commented 6 years ago

me as well

nishutayal commented 6 years ago

Having the same issue with v1.0.0 as well.

Exception in thread "main" io.confluent.ksql.util.KsqlException: Could not fetch broker information. KSQL cannot initialize AdminCLient.
        at io.confluent.ksql.util.KafkaTopicClientImpl.init(KafkaTopicClientImpl.java:188)
        at io.confluent.ksql.util.KafkaTopicClientImpl.<init>(KafkaTopicClientImpl.java:52)
        at io.confluent.ksql.rest.server.KsqlRestApplication.buildApplication(KsqlRestApplication.java:231)
        at io.confluent.ksql.rest.server.KsqlRestApplication.main(KsqlRestApplication.java:206)
sp1ndl3r commented 6 years ago

Having the same issue, have anyone solved this?

vodovozovge commented 6 years ago

I had the same error

[2017-12-15 17:19:20,508] ERROR Failed to initialize TopicClient: org.apache.kafka.common.errors.UnsupportedVersionException: The broker does not support
DESCRIBE_CONFIGS

started working for me when I updated the cluster to confluent platform 4.0.0 (from 3.2.2)

miguno commented 6 years ago

@vodovozovge: Your error is different -- this thread is about a problem to connect from KSQL to the target Kafka cluster.

io.confluent.ksql.util.KsqlException: Could not fetch broker information. KSQL cannot initialize AdminCLient

In your case there seems to be a version compatibility problem.

[2017-12-15 17:19:20,508] ERROR Failed to initialize TopicClient: org.apache.kafka.common.errors.UnsupportedVersionException: The broker does not support DESCRIBE_CONFIGS

If it's ok for you, could you please:

Thanks a lot!

zamirarif commented 6 years ago

I am also getting the same error. node:user [/appl/loanodi/cdc/kafka/ksql] ./bin/ksql-cli local Initializing KSQL... Could not fetch broker information. KSQL cannot initialize AdminCLient.

jrask commented 6 years ago

I had to add --bootrap-server, changing the property file did not help

./bin/ksql-cli local --bootstrap-server hostname:9092

hzqroll commented 6 years ago

how to fix it?

miguno commented 6 years ago

@hzqroll: I'd recommend to upgrade to the latest release of KSQL, which at the time of this writing is KSQL 4.1 (as part of Confluent Platform 4.1).

Among other things, KSQL 4.1 will show you more meaningful information during startup if it can't connect to a Kafka cluster/broker.

miguno commented 6 years ago

For the record: In KSQL 4.1 the command to start the KSQL CLI was renamed from ksql-cli to simply ksql. So everyone still using ksql-cli is using the older v0.x preview releases of KSQL and is very much encouraged to upgrade to KSQL v4.1. ;-)

chitraj8 commented 5 years ago

I downloaded docker ksql server 5.0.0, but it shows error 2019-08-25 23:37:03,559] ERROR Failed to initialize TopicClient: The broker does not support DESCRIBE_CONFIGS (io.confluent.ksql.util.KafkaTopicClient:270) 8/25/2019 7:37:03 PM[2019-08-25 23:37:03,560] ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:48) 8/25/2019 7:37:03 PMio.confluent.ksql.util.KsqlException: Could not fetch broker information. KSQL cannot initialize while trying to connect kafka cluster with 10.0.2.1 version.