Closed ChenAllen0305 closed 2 years ago
I don't recurrence in 4.9.4, Could you please provide the broker.log
I don't recurrence in 4.9.4, Could you please provide the
broker.log
PS E:\rocketmq\rocketmq-all-4.9.4-bin-release\bin> .\mqadmin updateAclConfig -n 10.0.0.23:9876 -b 10.0.0.23:10911 -a test-cl -s 12345678 -i PUB|SUB SUB : 无法将“SUB”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确, 然后再试一次。 所在位置 行:1 字符: 94
... n 10.0.0.23:9876 -b 10.0.0.23:10911 -a test-cl -s 12345678 -i PUB|SUB
CategoryInfo : ObjectNotFound: (SUB:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
Hi , @ChenAllen0305
I notice your OS is windows, you can use mqadmin.cmd
to replace mqadmin
to try it
Hi , @ChenAllen0305 I notice your OS is windows, you can use
mqadmin.cmd
to replacemqadmin
to try it
I change 'mqadmin.cmd' and try it in windows, it give same response.
Also I try to use updateAclConfig in local service, below is response: sh mqadmin updateAclConfig -n 10.0.0.23:9876 -b 10.0.0.23:10911 -a test-cl -s 12345678 -i PUB|SUB
-bash: SUB: command not found
Hi @ChenAllen0305 , I recommend that you open the log and look at broker.log, where you can see the details of the error, and we can also address specific errors
Hi @ChenAllen0305 , I recommend that you open the log and look at broker.log, where you can see the details of the error, and we can also address specific errors
well, I did open the log with updating logback_broker.xml file under conf folder. Also change the level to WARN or ERROR to get the infomation, but it doesn't show any info in broker.log when I running
any suggestions to check more details?
1 change the level to info
2 execute the command .\mqadmin.cmd updateAclConfig -n 10.0.0.23:9876 -b 10.0.0.23:10911 -a test-cl -s 12345678 -i PUB|SUB
3 provide the broker.log file
1 change the level to info 2 execute the command
.\mqadmin.cmd updateAclConfig -n 10.0.0.23:9876 -b 10.0.0.23:10911 -a test-cl -s 12345678 -i PUB|SUB
3 provide the broker.log file
I didn't see any information about updateAclConfig, maybe you can help me to check it broker.log
I find more details about update acl:
2022-07-01 16:02:26 ERROR AdminBrokerThread_8 - Failed to generate a proper update accessvalidator response java.lang.NullPointerException: null at org.apache.rocketmq.broker.processor.AdminBrokerProcessor.updateAndCreateAccessConfig(AdminBrokerProcessor.java:345) at org.apache.rocketmq.broker.processor.AdminBrokerProcessor.processRequest(AdminBrokerProcessor.java:234) at org.apache.rocketmq.remoting.netty.AsyncNettyRequestProcessor.asyncProcessRequest(AsyncNettyRequestProcessor.java:26) at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract$1.run(NettyRemotingAbstract.java:227) at org.apache.rocketmq.remoting.netty.RequestTask.run(RequestTask.java:80) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)
From the log to analyze, I guess you do not enable the acl, please check the broker.conf
aclEnable=true
Sorry, I set it false to test other question.
Here is the detail : 2022-07-01 16:12:46 INFO AclFileWatchService - The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist 2022-07-01 16:12:46 INFO HeartbeatThread_2 - new consumer connected, group: groupTest CONSUME_PASSIVELY BROADCASTING channel: ClientChannelInfo [channel=[id: 0x3b84cb2d, L:/10.0.0.23:10911 - R:/10.0.0.23:64975], clientId=10.0.0.23@DEFAULT, language=JAVA, version=399, lastUpdateTimestamp=1656663166908] 2022-07-01 16:12:46 INFO HeartbeatThread_2 - subscription changed, add new topic, group: groupTest SubscriptionData [classFilterMode=false, topic=%RETRY%group1, subString=, tagsSet=[], codeSet=[], subVersion=1656662986541, expressionType=TAG] 2022-07-01 16:12:46 INFO HeartbeatThread_2 - registerConsumer info changed ConsumerData [groupName=groupTest, consumeType=CONSUME_PASSIVELY, messageModel=BROADCASTING, consumeFromWhere=CONSUME_FROM_LAST_OFFSET, unitMode=false, subscriptionDataSet=[SubscriptionData [classFilterMode=false, topic=%RETRY%group1, subString=, tagsSet=[], codeSet=[], subVersion=1656662986541, expressionType=TAG]]] 10.0.0.23:64975 2022-07-01 16:12:46 INFO HeartbeatThread_2 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0x3b84cb2d, L:/10.0.0.23:10911 - R:/10.0.0.23:64975], clientId=10.0.0.23@DEFAULT, language=JAVA, version=399, lastUpdateTimestamp=1656663166920] 2022-07-01 16:12:46 INFO brokerOutApi_thread_2 - register broker[0]to name server localhost:9876 OK 2022-07-01 16:12:51 INFO AclFileWatchService - The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist 2022-07-01 16:12:56 INFO AclFileWatchService - The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist 2022-07-01 16:13:01 INFO AclFileWatchService - The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist 2022-07-01 16:13:01 INFO HeartbeatThread_3 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0x6085362e, L:/10.0.0.23:10911 - R:/10.0.0.23:65373], clientId=10.0.0.23@1656662310197, language=JAVA, version=399, lastUpdateTimestamp=1656663181526] 2022-07-01 16:13:02 INFO HeartbeatThread_4 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0x7ff76071, L:/10.0.0.23:10911 - R:/10.0.0.23:65411], clientId=10.0.0.23@1656662310854, language=JAVA, version=399, lastUpdateTimestamp=1656663182525] 2022-07-01 16:13:02 INFO HeartbeatThread_2 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0x1aef2a36, L:/10.0.0.23:10911 - R:/10.0.0.23:65413], clientId=10.0.0.23@1656662310874, language=JAVA, version=399, lastUpdateTimestamp=1656663182537] 2022-07-01 16:13:02 INFO HeartbeatThread_1 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0xbc866c30, L:/10.0.0.23:10911 - R:/10.0.0.23:65412], clientId=10.0.0.23@1656662310876, language=JAVA, version=399, lastUpdateTimestamp=1656663182537] 2022-07-01 16:13:02 INFO HeartbeatThread_3 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0xa044c5f9, L:/10.0.0.23:10911 - R:/10.0.0.23:65414], clientId=10.0.0.23@1656662310868, language=JAVA, version=399, lastUpdateTimestamp=1656663182550] 2022-07-01 16:13:02 INFO HeartbeatThread_4 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0xce15d8ff, L:/10.0.0.23:10911 - R:/10.0.0.23:65415], clientId=10.0.0.23@1656662310852, language=JAVA, version=399, lastUpdateTimestamp=1656663182550] 2022-07-01 16:13:02 INFO HeartbeatThread_2 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0x6c777bf1, L:/10.0.0.23:10911 - R:/10.0.0.23:65416], clientId=10.0.0.23@1656662310899, language=JAVA, version=399, lastUpdateTimestamp=1656663182566] 2022-07-01 16:13:02 INFO HeartbeatThread_1 - new producer connected, group: CLIENT_INNER_PRODUCER channel: ClientChannelInfo [channel=[id: 0xed2365a6, L:/10.0.0.23:10911 - R:/10.0.0.23:65417], clientId=10.0.0.23@1656662310905, language=JAVA, version=399, lastUpdateTimestamp=1656663182566] 2022-07-01 16:13:06 INFO AclFileWatchService - The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist 2022-07-01 16:13:11 INFO AclFileWatchService - The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist
I remember this conf/acl dir exists version 4.9.3, but it cannot work with updateAclConfig
The info of The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist
can not affect udateAclConfig, I can not see the error log, you execute the command .\mqadmin.cmd updateAclConfig -n 10.0.0.23:9876 -b 10.0.0.23:10911 -a test-cl -s 12345678 -i PUB|SUB
and observe if there have error,.
by the way, broker.conf need config namesrvAddr
That info is the only info when I running .\mqadmin.cmd updateAclConfig -n 10.0.0.23:9876 -b 10.0.0.23:10911 -a test-cl -s 12345678 -i PUB|SUB``. I still cannot running successfully with "PUB|SUB", maybe I need to find other way to slove my requirement.
BTW, If conf/acl dir is delete when update from 4.9.3 to 4.9.4, why the log file show
AclFileWatchService - The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist
what the response after execute the command?
org.apache.rocketmq.srvutil.AclFileWatchService#getAllAclFiles
print this log The default acl dir E:\rocketmq\rocketmq-all-4.9.4-bin-release\conf\acl is not exist
I'm sorry that I found nothing in broker.log after execute updateAclConfi command.
Is that work in your local environment when you udpate acl with "PUB|SUB"?
It's not local environment , I userd the 4.9.4 package what the official released
I also use 4.9.4 release too. Well, I would change the topicPerms single "SUB" instand of sloving this problem.
The issue tracker is used for bug reporting purposes ONLY whereas feature request needs to follow the RIP process. To avoid unnecessary duplication, please check whether there is a previous issue before filing a new one.
It is recommended to start a discussion thread in the mailing lists in cases of discussing your deployment plan, API clarification, and other non-bug-reporting issues. We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
Please ensure that your bug report is clear and self-contained. Otherwise, it would take additional rounds of communication, thus more time, to understand the problem itself.
Generally, fixing an issue goes through the following steps:
As a result, it would be very helpful yet challenging if you could provide an isolated project reproducing your reported issue. Anyway, please ensure your issue report is informative enough for the community to pick up. At a minimum, include the following hints:
BUG REPORT
What did you do (The steps to reproduce)?
What is expected to see? successfully update config in plain_acl.yml with 'SUB|PUB' or 'PUB|SUB'
What did you see instead? it can work with single SUB, PUB or DENY, but not work with 'SUB|PUB' or 'PUB|SUB'
Please tell us about your environment: rocketmq-all-4.9.4-bin-release
Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):