欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Rocketmq创建topic报错org.apache.rocketmq.acl.common.AclException: [10015:signature-failed] unable to cal

程序员文章站 2022-05-18 18:08:28
RocketMQLog:WARN No appenders could be found for logger (io.netty.util.internal.PlatformDependent0).RocketMQLog:WARN Please initialize the logger system properly.org.apache.rocketmq.tools.command.SubCommandException: UpdateTopicSubCommand command failed...
[root@localhost bin] ./mqadmin updateTopic -b localhost:10911  -t aaa
RocketMQLog:WARN No appenders could be found for logger (io.netty.util.internal.PlatformDependent0).
RocketMQLog:WARN Please initialize the logger system properly.
org.apache.rocketmq.tools.command.SubCommandException: UpdateTopicSubCommand command failed
	at org.apache.rocketmq.tools.command.topic.UpdateTopicSubCommand.execute(UpdateTopicSubCommand.java:185)
	at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:139)
	at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:90)
Caused by: org.apache.rocketmq.acl.common.AclException: [10015:signature-failed] unable to calculate a request signature. error=[10015:signature-failed] unable to calculate a request signature. error=Algorithm HmacSHA1 not available
	at org.apache.rocketmq.acl.common.AclSigner.signAndBase64Encode(AclSigner.java:84)
	at org.apache.rocketmq.acl.common.AclSigner.calSignature(AclSigner.java:73)
	at org.apache.rocketmq.acl.common.AclSigner.calSignature(AclSigner.java:68)
	at org.apache.rocketmq.acl.common.AclUtils.calSignature(AclUtils.java:69)
	at org.apache.rocketmq.acl.common.AclClientRPCHook.doBeforeRequest(AclClientRPCHook.java:44)
	at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.doBeforeRpcHooks(NettyRemotingAbstract.java:172)
	at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:368)
	at org.apache.rocketmq.client.impl.MQClientAPIImpl.createTopic(MQClientAPIImpl.java:284)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.createAndUpdateTopicConfig(DefaultMQAdminExtImpl.java:182)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExt.createAndUpdateTopicConfig(DefaultMQAdminExt.java:163)
	at org.apache.rocketmq.tools.command.topic.UpdateTopicSubCommand.execute(UpdateTopicSubCommand.java:139)
	... 2 more
Caused by: org.apache.rocketmq.acl.common.AclException: [10015:signature-failed] unable to calculate a request signature. error=Algorithm HmacSHA1 not available
	at org.apache.rocketmq.acl.common.AclSigner.sign(AclSigner.java:63)
	at org.apache.rocketmq.acl.common.AclSigner.signAndBase64Encode(AclSigner.java:79)
	... 12 more
Caused by: java.security.NoSuchAlgorithmException: Algorithm HmacSHA1 not available
	at javax.crypto.Mac.getInstance(Mac.java:181)
	at org.apache.rocketmq.acl.common.AclSigner.sign(AclSigner.java:57)
	... 13 more

错误原因:jar包引用失败
解决办法
在tool.sh 中${JAVA_HOME}/jre/lib/ext后加上ext文件夹的绝对路径(jdk路径)

 vim /app/rocketmq/bin/tools.sh
 如JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib:${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/jre/lib/ext"

Rocketmq创建topic报错org.apache.rocketmq.acl.common.AclException: [10015:signature-failed] unable to cal

本文地址:https://blog.csdn.net/tootsy_you/article/details/107359772