客户 Producer 发消息失败,出现 ACL exception
的报错
Caused by: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 1 DESC: org.apache.rocketmq.acl.common.AclException: [PRODUCE] Token authentication failed, please check, org.streamnative.pulsar.handlers.rocketmq.inner.RocketMQBrokerController$3.doBeforeRequest(RocketMQBrokerController.java:475)For more information, please visit the url, http://rocketmq.apache.org/docs/faq/at org.apache.rocketmq.client.impl.MQClientAPIImpl.processSendResponse(MQClientAPIImpl.java:665)at org.apache.rocketmq.client.impl.MQClientAPIImpl.sendMessageSync(MQClientAPIImpl.java:505)at org.apache.rocketmq.client.impl.MQClientAPIImpl.sendMessage(MQClientAPIImpl.java:487)at org.apache.rocketmq.client.impl.MQClientAPIImpl.sendMessage(MQClientAPIImpl.java:431)at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendKernelImpl(DefaultMQProducerImpl.java:854)at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:584)... 3 more
可能原因如下:
AK SK 配置不正确。access-key/secret-key 配置不正确会抛出
AclException
。access-key:namespace 配置权限中的角色密钥。
secret-key:namespace 配置权限中的角色名称。
客户接入的时候报错 RemotingConnectException
Caused
by
:
org.apache.rocketmq.remoting.exception.RemotingConnectException
:
connect
to
[
rocketmq
-
vsxssa
.
rocketmq
.
ap
-
gz
.
qcloud
.
tencenttdmq
.
com
:
5098
]
failed
at
org.apache.rocketmq.remoting.netty.NettyRemotingClient
.
getAndCreateNameserverChannel
(
NettyRemotingClient
.
java
:
445
)
at
org.apache.rocketmq.remoting.netty.NettyRemotingClient
.
getAndCreateChannel
(
NettyRemotingClient
.
java
:
400
)
at
org.apache.rocketmq.remoting.netty.NettyRemotingClient
.
invokeSync
(
NettyRemotingClient
.
java
:
369
)
at
org.apache.rocketmq.client.impl.MQClientAPIImpl
.
getTopicRouteInfoFromNameServer
(
MQClientAPIImpl
.
java
:
1363
)
at
org.apache.rocketmq.client.impl.MQClientAPIImpl
.
getTopicRouteInfoFromNameServer
(
MQClientAPIImpl
.
java
:
1353
)
at
org.apache.rocketmq.client.impl.factory.MQClientInstance
.
updateTopicRouteInfoFromNameServer
(
MQClientInstance
.
java
:
622
)
.
.
.
6
more
大部分时候是接入点填写错误,接入点可以在集群基本信息页面的网络模块获取。
集群接入地址默认支持 VPC 内网访问。
注意:
VPC 内网访问时,需要使用同一地域的 CVM 机器或者其他能成功访问 VPC 的环境。可使用 ping 或者 telnet 测试网络是否成功连接,网络不通时会抛出
RemotingConnectException
错误。