centos7下执行mqadmin报Algorithm HmacSHA1 not available

报错如下:

org.apache.rocketmq.tools.command.SubCommandException: UpdateTopicSubCommand command failed
        at org.apache.rocketmq.tools.command.topic.UpdateTopicSubCommand.execute(UpdateTopicSubCommand.java:181)
        at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:135)
        at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:86)
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:58)
        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:370)
        at org.apache.rocketmq.client.impl.MQClientAPIImpl.getBrokerClusterInfo(MQClientAPIImpl.java:1180)
        at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.examineBrokerClusterInfo(DefaultMQAdminExtImpl.java:275)
        at org.apache.rocketmq.tools.admin.DefaultMQAdminExt.examineBrokerClusterInfo(DefaultMQAdminExt.java:222)
        at org.apache.rocketmq.tools.command.CommandUtil.fetchMasterAddrByClusterName(CommandUtil.java:83)
        at org.apache.rocketmq.tools.command.topic.UpdateTopicSubCommand.execute(UpdateTopicSubCommand.java:154)
        ... 2 more

解决方法:打开bin目录下tools.sh文件,倒数第二行后面添加你的ext文件夹路径, 即可解决。

#===========================================================================================
# JVM Configuration
#===========================================================================================
JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=128m"
JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib:${JAVA_HOME}/jre/lib/ext:/usr/lib/jvm/jre-1.8.0-openjdk/lib/ext"
JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"

 

你可能感兴趣的:(SSM,java,spring,boot)