ISSUE-1078 - Fixed the issue that User can’t use mqadmin command normally if they don’t copy the tool.yml file to related fold and AclEnable flag is closed.
ISSUE-1147 - Fixed the issue that broker will report exception if open the aclEnable and enableDLegerCommitLog flag at the same time.
ISSUE-1156 - Add new mqadmin API for ACL configuration.
# 关闭 sh bin/mqshutdown broker sh bin/mqshutdown namesrv
# 发送消息 export NAMESRV_ADDR=localhost:9876 sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer # 接收消息 sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer # 查看集群状态 sh bin/mqadmin clusterList -n "127.0.0.1:9876"
查看集群状态若权限不对显示如下:
1 2 3 4 5 6 7 8 9 10 11 12
➜ rocketmq sh bin/mqadmin clusterList -n "127.0.0.1:9876" #Cluster Name #Broker Name #BID #Addr #Version #InTPS(LOAD) #OutTPS(LOAD) #PCWait(ms) #Hour #SPACE org.apache.rocketmq.client.exception.MQBrokerException: CODE: 1 DESC: org.apache.rocketmq.acl.common.AclException: No acl config for rocketmq222, org.apache.rocketmq.acl.plain.PlainPermissionManager.validate(PlainPermissionManager.java:667) BROKER: 10.94.30.17:10911 For more information, please visit the url, http://rocketmq.apache.org/docs/faq/ at org.apache.rocketmq.client.impl.MQClientAPIImpl.getBrokerRuntimeInfo(MQClientAPIImpl.java:1318) at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.fetchBrokerRuntimeStats(DefaultMQAdminExtImpl.java:293) at org.apache.rocketmq.tools.admin.DefaultMQAdminExt.fetchBrokerRuntimeStats(DefaultMQAdminExt.java:244) at org.apache.rocketmq.tools.command.cluster.ClusterListSubCommand.printClusterBaseInfo(ClusterListSubCommand.java:212) at org.apache.rocketmq.tools.command.cluster.ClusterListSubCommand.execute(ClusterListSubCommand.java:88) at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:149) at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:100) DefaultCluster broker-a 0 10.94.30.17:10911 0.00(,ms) 0.00(,ms) 0.00 0.0000