From e104c02d50758dacff00429d5e00458523c866f3 Mon Sep 17 00:00:00 2001 From: yx9o Date: Tue, 3 Dec 2024 09:56:40 +0800 Subject: [PATCH] [ISSUE #9014] Fix clusterAclConfigVersion command execution failed (#9017) --- .../rocketmq/broker/processor/AdminBrokerProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java index fc3b6182731..4c341dde920 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java @@ -886,6 +886,12 @@ private RemotingCommand getBrokerAclConfigVersion(ChannelHandlerContext ctx, Rem final RemotingCommand response = RemotingCommand.createResponseCommand(GetBrokerAclConfigResponseHeader.class); + if (!brokerController.getBrokerConfig().isAclEnable()) { + response.setCode(ResponseCode.SYSTEM_ERROR); + response.setRemark("The broker does not enable acl."); + return response; + } + final GetBrokerAclConfigResponseHeader responseHeader = (GetBrokerAclConfigResponseHeader) response.readCustomHeader(); try {