[Bug] No topic route info in name server for the topic
Before Creating the Bug Report
-
[X] I found a bug, not just asking a question, which should be created in GitHub Discussions.
-
[X] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
-
[X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Centos7
RocketMQ version
5.3.0
JDK Version
1.8
Describe the Bug
按照官方文档进行单机部署,https://rocketmq.apache.org/zh/docs/quickStart/01quickstart
并使用 JavaSDK 创建好生产者消费者,启动之后,Topic 能通过命令查询到
sh bin/mqadmin topicList -n 127.0.0.1:9876 -c
#Cluster Name #Topic #Consumer Group
DefaultCluster TestTopic YourConsumerGroup
但是当执行命令查看消费者链接情况时就出现错误
sh bin/mqadmin consumerConnection -n 127.0.0.1:9876 -g YourConsumerGroup
org.apache.rocketmq.tools.command.SubCommandException: ConsumerConnectionSubCommand command failed
at org.apache.rocketmq.tools.command.connection.ConsumerConnectionSubCommand.execute(ConsumerConnectionSubCommand.java:100)
at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:177)
at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:127)
Caused by: org.apache.rocketmq.client.exception.MQClientException: CODE: 17 DESC: No topic route info in name server for the topic: %RETRY%YourConsumerGroup
See https://rocketmq.apache.org/docs/bestPractice/06FAQ for further details.
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:2050)
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:2021)
at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.examineTopicRouteInfo(DefaultMQAdminExtImpl.java:591)
at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.examineConsumerConnectionInfo(DefaultMQAdminExtImpl.java:624)
at org.apache.rocketmq.tools.admin.DefaultMQAdminExt.examineConsumerConnectionInfo(DefaultMQAdminExt.java:332)
at org.apache.rocketmq.tools.command.connection.ConsumerConnectionSubCommand.execute(ConsumerConnectionSubCommand.java:71)
... 2 more
另外,通过 DashBoard 也是出现同样错误。
咱们官方能靠点谱吗?
Steps to Reproduce
https://rocketmq.apache.org/zh/docs/quickStart/01quickstart
按照官方的来,就能复现。
What Did You Expect to See?
期望应该是能看到消费者信息,消费进度等
What Did You See Instead?
None
Additional Context
No response
您好,我按照官方的 quickstart 测试下来是没问题的,我是通过工具测试消息收发。
请问你具体的测试步骤是怎样的呢,是不是先启动了消费者,这时 topic 还没创建没有路由信息,要发送消息的时候才会自动创建 topic,才会有路由信息。
%RETRY%YourConsumerGroup. 手动吧重试topic也创建一下。
> %RETRY%YourConsumerGroup. 手动吧重试topic也创建一下。
The `autoCreateTopicEnable` option in the broker configuration is enabled by default, so in theory the topic should be created automatically.
broker配置里的 `autoCreateTopicEnable` 选项是默认开启的,理论上topic应该会自动创建吧
我把RocketMQ自带的工具测试类down下来发现工具测试方法用的provider和consumer是DefaultMQProducer和DefaultMQPushConsumer,与官网中提供的案例ClientServiceProvider和PushConsumer不一样。
你可以尝试使用DefaultMQProducer和DefaultMQPushConsumer进行消息的发送与消费,会发现消息的trackType是正常的
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
This issue was closed because it has been inactive for 3 days since being marked as stale.