You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Yj Jia <yj...@gmail.com> on 2023/06/01 13:01:24 UTC
kafka 3.4.0 sasl_PLAINTEXT exec kafka-metadata-quorum.sh Unexpected Kafka request of type METADATA during SASL handshake.
kafka 3.4.0 sasl_PLAINTEXT exec kafka-metadata-quorum.sh Unexpected Kafka
request of type METADATA during SASL handshake.
1、kafka 3.4.0 config broker sasl_PLAINTEXT,
./kafka-metadata-quorum.sh --bootstrap-server 192.168.3.138:9092
--command-config kafka_server_config.conf describe --status
kafkalog stdout :
[2023-05-30 16:21:36,542] INFO [SocketServer listenerType=BROKER,
nodeId=2] Failed authentication with /192.168.3.138
(channelId=192.168.3.139:9092-192.168.3.138:36074-41) (Unexpected
Kafka request of type METADATA during SASL handshake.)
(org.apache.kafka.common.network.Selector)
2、kafka server server.properties config
process.roles=broker,controllernode.id=1
controller.quorum.voters=1@192.168.3.138:9093,2@192.168.3.139:9093,3@192.168.3.140:9093
listeners=BROKER://:9092,CONTROLLER://:9093inter.broker.listener.name=BROKER
controller.listener.names=CONTROLLER
listener.security.protocol.map=BROKER:SASL_PLAINTEXT,CONTROLLER:PLAINTEXT
sasl.mechanism.inter.broker.protocol=PLAIN
sasl.enabled.mechanisms=PLAIN
3、kafka_server_jaas.conf config
broker.KafkaServer {
org.apache.kafka.common.security.plain.PlainLoginModule required
username="admin"
password="admin-secret"
user_admin="admin-secret"
user_alice="alice-secret";
};
4、kafka_server_config.conf config
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule
required \
username="admin" \
password="admin-secret";
security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN
5、 use kafka_server_config.conf create topic or descirbe topic info
[root@opensource01 kafka_2.13-3.4.0]# bin/kafka-topics.sh --describe
--topic enmotech --bootstrap-server 192.168.3.138:9092
--command-config kafka_server_config.conf
Topic: enmotech TopicId: ZXVFSBuUT7e_xYWKk4rV9A PartitionCount:
5 ReplicationFactor: 3 Configs: segment.bytes=1073741824
Topic: enmotech Partition: 0 Leader: 3 Replicas: 3,1,2
Isr: 3,1,2
Topic: enmotech Partition: 1 Leader: 1 Replicas: 1,2,3
Isr: 3,1,2
Topic: enmotech Partition: 2 Leader: 2 Replicas: 2,3,1
Isr: 3,1,2
Topic: enmotech Partition: 3 Leader: 3 Replicas: 3,1,2
Isr: 3,1,2
Topic: enmotech Partition: 4 Leader: 1 Replicas: 1,2,3
Isr: 3,1,2
PS: don't enable sasl_plaintext ,exec kafka-metadata-quorum.sh,the output
is :
[root@opensource02 bin]# ./kafka-metadata-quorum.sh
--bootstrap-server 192.168.3.139:9092 describe --replication
NodeId LogEndOffset Lag LastFetchTimestamp
LastCaughtUpTimestamp Status
1 96191 0 1685433493877 1685433493877
Leader
2 96191 0 1685433493482 1685433493482
Follower
3 96191 0 1685433493474 1685433493474
Follower
how can i fix this problem
Re: kafka 3.4.0 sasl_PLAINTEXT exec kafka-metadata-quorum.sh Unexpected Kafka request of type METADATA during SASL handshake.
Posted by Luke Chen <sh...@gmail.com>.
Hi Yj,
Thanks for reporting the issue.
This is a known issue will be fixed in v3.4.1, which is planning to release
next week (hopefully).
JIRA: https://issues.apache.org/jira/browse/KAFKA-14711
Thanks.
Luke
On Thu, Jun 1, 2023 at 9:02 PM Yj Jia <yj...@gmail.com> wrote:
> kafka 3.4.0 sasl_PLAINTEXT exec kafka-metadata-quorum.sh Unexpected Kafka
> request of type METADATA during SASL handshake.
>
> 1、kafka 3.4.0 config broker sasl_PLAINTEXT,
>
> ./kafka-metadata-quorum.sh --bootstrap-server 192.168.3.138:9092
> --command-config kafka_server_config.conf describe --status
>
> kafkalog stdout :
>
> [2023-05-30 16:21:36,542] INFO [SocketServer listenerType=BROKER,
> nodeId=2] Failed authentication with /192.168.3.138
> (channelId=192.168.3.139:9092-192.168.3.138:36074-41) (Unexpected
> Kafka request of type METADATA during SASL handshake.)
> (org.apache.kafka.common.network.Selector)
>
> 2、kafka server server.properties config
>
> process.roles=broker,controllernode.id=1
> controller.quorum.voters=1@192.168.3.138:9093,2@192.168.3.139:9093,
> 3@192.168.3.140:9093
> listeners=BROKER://:9092,CONTROLLER://:9093inter.broker.listener.name
> =BROKER
> controller.listener.names=CONTROLLER
> listener.security.protocol.map=BROKER:SASL_PLAINTEXT,CONTROLLER:PLAINTEXT
> sasl.mechanism.inter.broker.protocol=PLAIN
> sasl.enabled.mechanisms=PLAIN
>
> 3、kafka_server_jaas.conf config
>
> broker.KafkaServer {
> org.apache.kafka.common.security.plain.PlainLoginModule required
> username="admin"
> password="admin-secret"
> user_admin="admin-secret"
> user_alice="alice-secret";
> };
>
> 4、kafka_server_config.conf config
>
> sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule
> required \
> username="admin" \
> password="admin-secret";
> security.protocol=SASL_PLAINTEXT
> sasl.mechanism=PLAIN
>
> 5、 use kafka_server_config.conf create topic or descirbe topic info
>
> [root@opensource01 kafka_2.13-3.4.0]# bin/kafka-topics.sh --describe
> --topic enmotech --bootstrap-server 192.168.3.138:9092
> --command-config kafka_server_config.conf
> Topic: enmotech TopicId: ZXVFSBuUT7e_xYWKk4rV9A PartitionCount:
> 5 ReplicationFactor: 3 Configs: segment.bytes=1073741824
> Topic: enmotech Partition: 0 Leader: 3 Replicas: 3,1,2
> Isr: 3,1,2
> Topic: enmotech Partition: 1 Leader: 1 Replicas: 1,2,3
> Isr: 3,1,2
> Topic: enmotech Partition: 2 Leader: 2 Replicas: 2,3,1
> Isr: 3,1,2
> Topic: enmotech Partition: 3 Leader: 3 Replicas: 3,1,2
> Isr: 3,1,2
> Topic: enmotech Partition: 4 Leader: 1 Replicas: 1,2,3
> Isr: 3,1,2
>
> PS: don't enable sasl_plaintext ,exec kafka-metadata-quorum.sh,the output
> is :
>
> [root@opensource02 bin]# ./kafka-metadata-quorum.sh
> --bootstrap-server 192.168.3.139:9092 describe --replication
> NodeId LogEndOffset Lag LastFetchTimestamp
> LastCaughtUpTimestamp Status
> 1 96191 0 1685433493877 1685433493877
> Leader
> 2 96191 0 1685433493482 1685433493482
> Follower
> 3 96191 0 1685433493474 1685433493474
> Follower
>
>
>
> how can i fix this problem
>