diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java index b625cd94c18c89bf048d98c45da926d17905e634..465a2db586496cd3b7080eb339e996aa800f0767 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java @@ -164,9 +164,9 @@ public class UpdateAccessConfigSubCommand implements SubCommand { String clusterName = commandLine.getOptionValue('c').trim(); defaultMQAdminExt.start(); - Set masterSet = - CommandUtil.fetchMasterAddrByClusterName(defaultMQAdminExt, clusterName); - for (String addr : masterSet) { + Set brokerAddrSet = + CommandUtil.fetchMasterAndSlaveAddrByClusterName(defaultMQAdminExt, clusterName); + for (String addr : brokerAddrSet) { defaultMQAdminExt.createAndUpdatePlainAccessConfig(addr, accessConfig); System.out.printf("create or update plain access config to %s success.%n", addr); }