Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Green tick sign with an active controller is placed next to the wrong controller #4363

Open
4 tasks done
KrzysztofDzioba opened this issue Jan 18, 2024 · 5 comments
Open
4 tasks done
Labels
status/triage Issues pending maintainers triage type/bug Something isn't working

Comments

@KrzysztofDzioba
Copy link

KrzysztofDzioba commented Jan 18, 2024

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)

Hi. I created 3 kafka brokers. In "Brokers" section, I can see "Active Controller" with a value 2. However, in the list of brokers below, I can see a green 'tick' mark next to broker ID 3. When I move a curson on this tick, I can read "Active Controller".

I checked the logs on each broker. I can read there following:
broker1: DEBUG [Controller id=1] Broker 2 has been elected as the controller, so stopping the election process.
broker2: INFO [Controller id=2] 2 successfully elected as the controller.
broker3: DEBUG [Controller id=3] Broker 2 has been elected as the controller, so stopping the election process.

So the active one is 2. That means that tick mark next to broker id 3 is wrong. (Or it's me that I can't get something here)

All best,
Chris

Expected behavior

Green tick mark should be next to broker id 2

Your installation details

tested on: 56fa824
v0.7.1

Steps to reproduce

Use following docker file:

---
version: '2'
services:
  zookeeper-1:
    image: confluentinc/cp-zookeeper:latest
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000
    ports:
      - 22181:2181

  zookeeper-2:
    image: confluentinc/cp-zookeeper:latest
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000
    ports:
      - 32181:2181
  
  kafka-1:
    image: confluentinc/cp-kafka:latest
    depends_on:
      - zookeeper-1
      - zookeeper-2

    ports:
      - 29092:29092
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:9092,PLAINTEXT_HOST://localhost:29092
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
  kafka-2:
    image: confluentinc/cp-kafka:latest
    depends_on:
      - zookeeper-1
      - zookeeper-2
    ports:
      - 39092:39092
    environment:
      KAFKA_BROKER_ID: 2
      KAFKA_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-2:9092,PLAINTEXT_HOST://localhost:39092
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
  kafka-3:
    image: confluentinc/cp-kafka:latest
    depends_on:
      - zookeeper-1
      - zookeeper-2
    ports:
      - 49092:49092
    environment:
      KAFKA_BROKER_ID: 3
      KAFKA_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-3:9092,PLAINTEXT_HOST://localhost:49092
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1  
  kafka-ui:
    image: provectuslabs/kafka-ui
    container_name: kafka-ui
    ports:
      - 8090:8080
    depends_on:
     - zookeeper-1
     - zookeeper-2
     - kafka-1
     - kafka-2
    environment:
      KAFKA_CLUSTERS_0_NAME: local
      KAFKA_CLUSTERS_0_BOOTSTRAP_SERVERS: kafka-2:9092
      KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper-1:2181

Screenshots

image

Logs

image

image

image

Additional context

No response

@KrzysztofDzioba KrzysztofDzioba added status/triage Issues pending maintainers triage type/bug Something isn't working labels Jan 18, 2024
Copy link

Hello there KrzysztofDzioba! 👋

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. 👀

@KrzysztofDzioba
Copy link
Author

Hi, please take a look on this

@liudaac
Copy link

liudaac commented Feb 4, 2024

It`s surely a bug in 0.7.1. And has been fixed in master branch. But also exist another bug as the activeController node is not the correct one when the cluster is running on kraft. I have commited a pr on this problem.

@lxb6476
Copy link

lxb6476 commented Jul 22, 2024

It`s surely a bug in 0.7.1. And has been fixed in master branch. But also exist another bug as the activeController node is not the correct one when the cluster is running on kraft. I have commited a pr on this problem.

I have reviewed the PR code you submitted and noticed that you obtained the correct active controller id for the KRaft mode deployment via JMX. In the master branch implementation, it seemed to be obtained directly through Java's kafka-clients, but it would get active controlelr id from the broker nodes, similar to the way the active controller is obtained in a Zookeeper-deployed mode.

@Haarolean
Copy link
Contributor

this repo is not maintained (#4255), please refer to https://github.com/kafbat/kafka-ui where we've fixed all the related issues (IIRC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Issues pending maintainers triage type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants