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

MQ常见问题

程序员文章站 2022-06-30 12:55:25
...

1.  sh bin/mqadmin topicList 命令发生错误,错误如下:

org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to <null> failed
	at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:357)
	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicListFromNameServer(MQClientAPIImpl.java:1219)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.fetchAllTopicList(DefaultMQAdminExtImpl.java:220)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExt.fetchAllTopicList(DefaultMQAdminExt.java:183)
	at org.apache.rocketmq.tools.command.topic.TopicListSubCommand.execute(TopicListSubCommand.java:105)
	at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:128)
	at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:78)

解决办法: export NAMESRV_ADDR=localhost:9876 之后在进行查询