使用阿里云rocketmq发送同步消息报错,使用示例demo配置好账号信息、组、主题后运行报错:
Caused by: com.aliyun.openservices.ons.shaded.org.apache.rocketmq.client.exception.ClientException: error code: OTHER
at com.aliyun.openservices.ons.shaded.org.apache.rocketmq.client.impl.producer.ProducerImpl.onExecutionException(ProducerImpl.java:838)
at com.aliyun.openservices.ons.shaded.org.apache.rocketmq.client.impl.producer.ProducerImpl.send(ProducerImpl.java:351)
at com.aliyun.openservices.ons.shaded.org.apache.rocketmq.client.impl.producer.ProducerImpl.send(ProducerImpl.java:339)
at com.aliyun.openservices.ons.shaded.org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:183)
at com.aliyun.openservices.ons.client.rocketmq.impl.ProducerImpl.send(ProducerImpl.java:152)
... 94 more
Caused by: com.aliyun.openservices.ons.shaded.io.grpc.StatusRuntimeException: PERMISSION_DENIED: Grpc server auth error, request doesn't has topic or group. request=apache.rocketmq.v1.SendMessageRequest, requestId=6afec3dd-7a0d-4350-830f-b6ecc791e7bf, error=permission denied: signature validate failed.-2 Signature not match!, validate=false, akDisabled=false, whiteList=true
at com.aliyun.openservices.ons.shaded.io.grpc.Status.asRuntimeException(Status.java:534)
at com.aliyun.openservices.ons.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533)
at com.aliyun.openservices.ons.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at com.aliyun.openservices.ons.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at com.aliyun.openservices.ons.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at com.aliyun.openservices.ons.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:553)
at com.aliyun.openservices.ons.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:68)
at com.aliyun.openservices.ons.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:739)
at com.aliyun.openservices.ons.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:718)
at com.aliyun.openservices.ons.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at com.aliyun.openservices.ons.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
...
...
PERMISSION_DENIED
这个一般是鉴权问题,可能是AK/SK不匹配。
如果是4.0系列实例,检查下AK、SK是否填写正确。AK、SK可以参考这篇文档获取:https://help.aliyun.com/document_detail/116401.htm
如果是5.0系列实例,公网访问时AK、SK参数需要填写成实例的用户名和密码。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
涵盖 RocketMQ、Kafka、RabbitMQ、MQTT、轻量消息队列(原MNS) 的消息队列产品体系,全系产品 Serverless 化。RocketMQ 一站式学习:https://rocketmq.io/