-3

I am trying to be able to play around with some topics on my local machine.

For this I want to use Kafkaesque https://kafka.esque.at/

My spring boot application has the following configurations:

I found out a docker image that I added in the docker-compose file from bitnami that looks like this for setting up the environment

zookeeper:
    image: docker.io/bitnami/zookeeper:3.8
    ports:
      - "2181:2181"
    volumes:
      - "zookeeper_data:/bitnami"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
  kafka:
    image: docker.io/bitnami/kafka:3.4
    ports:
      - "9092:9092"
      - "9000:9000"
      - "9080:8080"
      - "9081:9081"
      - "9082-9084:9082-9084"
    volumes:
      - "kafka_data:/bitnami"
    environment:
      - ALLOW_PLAINTEXT_LISTENER=yes
      - KAFKA_ENABLE_KRAFT=no
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
    depends_on:
      - zookeeper
  schema-registry:
    image: docker.io/bitnami/schema-registry:7.3
    ports:
      - '8081:8081'
    depends_on:
      - kafka
    environment:
      - SCHEMA_REGISTRY_LISTENERS=http://0.0.0.0:8081
      - SCHEMA_REGISTRY_KAFKA_BROKERS=PLAINTEXT://kafka:9092

In my local application properties I set the configuration like this

spring.kafka:
  bootstrap-servers: localhost:9092
  properties:
    schema.registry.url: http://localhost:8081
  streams:
    cleanup.on-startup: true

In kafkaesque (https://kafka.esque.at/) I set the properties like this

enter image description here

My case is the one presented in scenario 4 here https://www.confluent.io/blog/kafka-client-cannot-connect-to-broker-on-aws-on-docker-etc/

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
cUser
  • 392
  • 8
  • 25

1 Answers1

0

I suppose you should look for how to connect to Kafka behind proxy or when in docker container. Most likely the issue is, that IP address assigned to container is something like 10.x.y.z, while you are connecting to 127.0.0.1. This should break Kafka protocol between client (Kafkesque) and server (Kafka). Here is good enough explanation in this article.

As alternative, you may look for how to put kafkaesque into docker container. Which is not trivial, since Desktop GUI applications are not well supported in docker container.

Otherwise, web-based Kafka GUI applications already exist as containers that you can try instead.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
muradm
  • 1,973
  • 19
  • 30