kafka kraft模式升级metadata.version

kafka kraft模式升级metadata.version

kafka 3.x版本以后使用kraft模式,当从低版本的kafka升级到高版本的kafka时,一般来说较为简单。如从3.5.0版本升级到3.9.0版本,一般来说只需要保留数据目录(kraft/server.properties文件中配置的log.dirs目录)和配置文件,其他的直接覆盖即可。

但是后续当使用的时候可能会出现报错,提示metadata.version版本过低,此时需要升级元数据中的metadata.version。以下命令可以直接将metadata.version进行升级

bin/kafka-features.sh --bootstrap-server localhost:19092 upgrade --metadata 3.9

提示metadata.version was upgraded to xxx即升级成功

### Kafka 3.9 KRaft Mode `kafka_server_jaas.conf` Configuration Details In the context of Apache Kafka version 3.9 operating under KRaft (Kafka Raft Metadata) mode, configuring security through JAAS is essential for enabling SASL authentication mechanisms. The file `/etc/kafka/kafka_server_jaas.conf` plays a critical role in specifying how clients authenticate to brokers and vice versa. For setting up this configuration specifically within KRaft mode: #### Broker-to-Broker Authentication Entry The following entry configures broker-to-broker communication using SCRAM-SHA-512 as an example mechanism: ```plaintext KafkaServer { org.apache.kafka.common.security.scram.ScramLoginModule required username="broker" password="broker-secret"; }; ``` This ensures that all internal communications between brokers are authenticated securely[^1]. #### Client-to-Broker Authentication Entry To allow client applications to connect securely via SASL/SCRAM, add another section like so: ```plaintext Client { org.apache.kafka.common.security.scram.ScramLoginModule required username="client-user" password="client-password"; }; ``` Here, replace `"client-user"` and `"client-password"` with credentials intended for application-level access control purposes[^2]. It's important to note when running Kafka in KRaft mode, these configurations must align closely not only with your overall cluster setup but also any additional layers of network or transport layer security you might have enabled such as TLS encryption on top of SASL-based mutual authentication schemes. When starting Kafka servers configured thusly, ensure `-Djava.security.auth.login.config=/etc/kafka/kafka_server_jaas.conf` appears correctly appended to startup scripts ensuring proper loading at runtime initialization stages.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值