Skip to content

FE: Clusters with spaces in names are not rendered #341

Closed
@giom-l

Description

@giom-l

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 main-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)

When using the version v1.0.0 with a cluster that has a name with spaces in it ==> no issue.
image

Since we wanted to have this fix (as we use a lot filters), we switched to the latest-to-date main version.

However the UI does not work anymore.
The UI runs but we don't have anymore content in brokers/topic/consumers/ACL panels. It remains all empty.
image

I found no logs indicating the potential issue (even in debug) and found it out by chance when I noticed my local UI had simpler names with no spaces.

After just replacing spaces with underscores, it came back to work.
image

Expected behavior

It should work no matter the name (or at least specify authorized characters)

Your installation details

Test is under local docker-compose with latest-to-date main version but not sure it would changed in any other deployment way.

Steps to reproduce

The following is an example not working.
Just replacing space with underscore in the variable KAFKA_CLUSTERS_0_NAME make it work again.

---
version: '2'
services:

  kafbat-ui:
    container_name: kafbat-ui
    image: ghcr.io/kafbat/kafka-ui:main
    ports:
      - 8080:8080
    depends_on:
      - kafka0
    environment:
      KAFKA_CLUSTERS_0_NAME: "local cluster"
      KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092
      KAFKA_CLUSTERS_0_METRICS_PORT: 9997
      KAFKA_CLUSTERS_0_READONLY: 'true'
      DYNAMIC_CONFIG_ENABLED: 'true'

  kafka0:
    image: confluentinc/cp-kafka:7.2.1
    hostname: kafka0
    container_name: kafka0
    ports:
      - "9092:9092"
      - "9997:9997"
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
      KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092'
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_JMX_PORT: 9997
      KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9997
      KAFKA_PROCESS_ROLES: 'broker,controller'
      KAFKA_NODE_ID: 1
      KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka0:29093'
      KAFKA_LISTENERS: 'PLAINTEXT://kafka0:29092,CONTROLLER://kafka0:29093,PLAINTEXT_HOST://0.0.0.0:9092'
      KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
      KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
      KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
    volumes:
      - ./scripts/update_run.sh:/tmp/update_run.sh
    command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"

  kafka-init-topics:
    image: confluentinc/cp-kafka:7.2.1
    volumes:
       - ./data/message.json:/data/message.json
    depends_on:
      - kafka0
    command: "bash -c 'echo Waiting for Kafka to be ready... && \
               cub kafka-ready -b kafka0:29092 1 30 && \
               kafka-topics --create --topic second.users --partitions 3 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \
               kafka-topics --create --topic first.messages --partitions 2 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \
               kafka-console-producer --bootstrap-server kafka0:29092 -topic second.users < /data/message.json'"

Screenshots

No response

Logs

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

scope/frontendRelated to frontend changesstatus/confirmedA bug that is a confirmed one. Applicable only for the bug label.status/triage/completedAutomatic triage completedtype/bugSomething isn't working

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions