如果你和我一样遇到了这样的rocketMQ异常:No route info of this topic
还有 org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout
的异常就往下看吧,踩了4个多小时的坑,哭了…
No route info of this topic xx异常
看了网上很多解决方案,这个异常主要可能有几种情况:
- broker没有注册到nameserver
- producer没有连到nameserver(很可能防火墙问题)
- topic没有创建
【情况1】运行命令:sh mqadmin clusterList -n localhost:9876
看到这种说明正常,看看第二种有没有问题
【情况2】运行命令:systemctl stop firewalld.service
Failed to stop firewalld.service: Unit firewalld.service not loaded.
说明我们的防火墙已经关闭了,不是这个问题
【情况3】运行命令:sh mqadmin topicstatus -n 公网ip:9876 -t 你的topic名称