I'm trying to get ksqlDB-server working using Docker and configuring it with this guide but it doesn't seem to be working properly, as everytime I attempt to do this command:
docker run -d --network=kafka --name=ksqldb_c -p 8088:8088 -e KSQL_BOOTSTRAP_SERVERS=localhost:9092 -e KSQL_LISTENERS=http://0.0.0.0:8088/ -e KSQL_SERVICE_ID=ksql_service_2_ confluentinc/ksqldb-server:0.20.0
I get the following error:
[2021-08-28 15:42:00,720] ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:69) java.lang.RuntimeException: Failed to get Kafka cluster information
at io.confluent.ksql.services.KafkaClusterUtil.getKafkaClusterId(KafkaClusterUtil.java:107)
at io.confluent.ksql.rest.server.KsqlRestApplication.buildApplication(KsqlRestApplication.java:638)
at io.confluent.ksql.rest.server.KsqlServerMain.createExecutable(KsqlServerMain.java:155)
at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:62)
Caused by: java.util.concurrent.TimeoutException
I'm not exactly sure what I'm doing wrong here. I created the Kafka and Zookeeper containers like so via powershell:
docker run -d –-network=kafka –name=zookeeper_c -e ZOOKEEPER_CLIENT_PORT=2181 -e ZOOKEEPER_TICK_TIME=2000 -p 2181:2181 confluentinc/cp-zookeeper
docker run -d –-network=kafka –name=kafka_c -p 9092:9092 -e KAFKA_ZOOKEEPER_CONNECT=zookeeper_c:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 confluentinc/cp-kafka
I've tried using different addresses for the bootstrap servers but the problem still persists, any help would be great