provectus / kafka-ui

Open-Source Web UI for Apache Kafka Management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with Non-Sequential Kafka Cluster Configuration Indexing in Docker Compose Environment

dkswnkk opened this issue · comments

Issue submitter TODO list

  • I've looked up my issue in FAQ
  • I've searched for an already existing issues here
  • I've tried running master-labeled docker image and the issue still persists there
  • I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

I've encountered an issue while configuring multiple Kafka clusters in a Docker Compose environment for Kafka UI. It seems that the application requires the Kafka cluster environment variables (like KAFKA_CLUSTERS_N_NAME and KAFKA_CLUSTERS_N_BOOTSTRAPSERVERS) to be sequentially indexed without skipping any numbers. Specifically, if the sequence jumps (for example, from KAFKA_CLUSTERS_1_NAME directly to KAFKA_CLUSTERS_3_NAME without a KAFKA_CLUSTERS_2_NAME), Kafka UI does not recognize the configuration properly, leading to unexpected behavior or errors. Is this the intended behavior?

Expected Behavior

I expected Kafka UI to either handle non-sequential indexes gracefully by ignoring missing indexes.

Actual Behavior

Kafka UI seems to either crash or fail to display Kafka clusters correctly when the cluster configuration indexes are not sequential.

Your installation details

version: '3'
name: newrror
services:
  kafka-ui:
    restart: always
    container_name: kafka-ui-project
    image: provectuslabs/kafka-ui:latest
    ports:
      - 8080:8080
    environment:
      KAFKA_CLUSTERS_0_NAME: DV-kafka
      KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: ~
      KAFKA_CLUSTERS_1_NAME: ST-kafka
      KAFKA_CLUSTERS_1_BOOTSTRAPSERVERS: ~
      KAFKA_CLUSTERS_3_NAME: PR-kafka
      KAFKA_CLUSTERS_3_BOOTSTRAPSERVERS: ~

After this setup, if you run docker-compose up -d and try to access http://localhost:8080/, you will not be able to connect, and the container will crash shortly thereafter.

Steps to reproduce

  1. Set up a Docker Compose file with Kafka UI service.

  2. Configure the environment variables for multiple Kafka clusters, intentionally skipping the index number (e.g., define KAFKA_CLUSTERS_0_NAME, KAFKA_CLUSTERS_1_NAME, and then directly KAFKA_CLUSTERS_3_NAME).

  3. Launch the Docker Compose environment.

  4. Observe that Kafka UI either shows errors or does not display the clusters as expected.

Screenshots

No response

Logs

No response

Additional context

No response

Hello there dkswnkk! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

Most likely, the app itself has nothing to do with how these are treated. This is rather handled by spring framework. Also, it's rather weird to use a numbered list with missing items within one, so I don't really find this an issue. Moreover, we do not recommend using env properties (at least, mostly) and recommend using yaml configs instead.

It seems there has been a misunderstanding regarding the issue I'm encountering with the Docker Compose setup for Kafka UI. This problem occurs when executing the docker-compose up -d command via the command line, independently of the Spring framework. Based on your response, I understand that using a numbered list with missing items might not be typical or recommended, and it seems this is expected behavior.

Thank you for your response!