how do i correct configuration (server.properties in kafka kraft version)

30 Views Asked by At

my kraft/server.properties

there is 3 node for combined mode(broker, controller) and my configuration is like below.


listeners=KAFKARTGS://:9092,CONTROLLER://:9093
inter.broker.listener.name=KAFKARTGS
controller.listener.names=CONTROLLER

listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL,KAFKARTGS:PLAINTEXT

this configuration doesnt work well result is like below

[2024-03-21 19:46:47,962] INFO [broker-3-to-controller-heartbeat-channel-manager]: Recorded new controller, from now on will use node kafka-rtgs3:9093 (id: 3 rack: null) (kafka.server.NodeToControllerRequestThread)
[2024-03-21 19:46:48,012] INFO [broker-3-to-controller-heartbeat-channel-manager]: Recorded new controller, from now on will use node kafka-rtgs3:9093 (id: 3 rack: null) (kafka.server.NodeToControllerRequestThread)
[2024-03-21 19:46:48,015] INFO [NodeToControllerChannelManager id=3 name=heartbeat] Client requested disconnect from node 3 (org.apache.kafka.clients.NetworkClient)
[2024-03-21 19:46:48,015] INFO [broker-3-to-controller-heartbeat-channel-manager]: Recorded new controller, from now on will use node kafka-rtgs3:9093 (id: 3 rack: null) (kafka.server.NodeToControllerRequestThread)
[2024-03-21 19:46:48,065] INFO [broker-3-to-controller-heartbeat-channel-manager]: Recorded new controller, from now on will use node kafka-rtgs3:9093 (id: 3 rack: null) (kafka.server.NodeToControllerRequestThread)
[2024-03-21 19:46:48,068] INFO [NodeToControllerChannelManager id=3 name=heartbeat] Client requested disconnect from node 3 (org.apache.kafka.clients.NetworkClient)
[2024-03-21 19:46:48,068] INFO [broker-3-to-controller-heartbeat-channel-manager]: Recorded new controller, from now on will use node kafka-rtgs3:9093 (id: 3 rack: null) (kafka.server.NodeToControllerRequestThread)
[2024-03-21 19:46:48,095] INFO [RaftManager id=3] Node 2 disconnected. (org.apache.kafka.clients.NetworkClient)
[2024-03-21 19:46:48,095] WARN [RaftManager id=3] Connection to node 2 (kafka-rtgs2/192.168.1.92:9093) could not be established. Node may not be available. (org.apache.kafka.clients.NetworkClient)

what did i misconfigured?

when i set configuration like below, it works well. but, above configuration don't.

i don't understand what's difference between them.

i just changed the name of listeners. TT

listeners=PLAINTEXT://:9092,CONTROLLER://:9093

# Name of listener used for communication between brokers.
inter.broker.listener.name=PLAINTEXT

# Listener name, hostname and port the broker will advertise to clients.
# If not set, it uses the value for "listeners".
advertised.listeners=PLAINTEXT://kafka-rtgs3:9092

# A comma-separated list of the names of the listeners used by the controller.
# If no explicit mapping set in `listener.security.protocol.map`, default will be using PLAINTEXT protocol
# This is required if running in KRaft mode.
controller.listener.names=CONTROLLER

# Maps listener names to security protocols, the default is for them to be the same. See the config documentation for more details
listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
0

There are 0 best solutions below