开发者社区> 问答> 正文

rocketmq启动后,控制台访问消费者报错

docker-compose部署rocketmq 启动后控制台访问,到消费者这边一直报错:[2021-01-18 08:26:01.243] WARN examineConsumerConnectionInfo exception, FILTERSRV_CONSUMER rocketmq-console-ng | org.apache.rocketmq.client.exception.MQClientException: CODE: 17 DESC: No topic route info in name server for the topic: %RETRY%FILTERSRV_CONSUMER rocketmq-console-ng | See http://rocketmq.apache.org/docs/faq/ for further details. 不知道处理哪里 下面是我的yml文件 version: '2' services: namesrv: image: rocketmqinc/rocketmq container_name: rmqnamesrv ports: - 9876:9876 volumes: - /data/rocketmq/logs:/root/logs - /root/rocketmq/store:/root/store - /etc/localtime:/etc/localtime:ro command: sh mqnamesrv broker: image: rocketmqinc/rocketmq container_name: rmqbroker ports: - 10909:10909 - 10911:10911 - 10912:10912 volumes: - /data/rocketmq/logs:/root/logs - /data/rocketmq/store:/root/store - /data/rocketmq/conf/broker.conf:/root/rocketmq/conf/broker.conf - /etc/localtime:/etc/localtime:ro command: sh mqbroker autoCreateTopicEnable=true -n 192.168.1.38:9876 -c ../conf/broker.conf depends_on: - namesrv environment: - JAVA_HOME=/usr/lib/jvm/jre console: image: styletang/rocketmq-console-ng container_name: rocketmq-console-ng ports: - 8080:8080 volumes: - /etc/localtime:/etc/localtime:ro depends_on: - namesrv environment: - JAVA_OPTS= -Dlogging.level.root=info -Drocketmq.namesrv.addr=rmqnamesrv:9876 - Dcom.rocketmq.sendMessageWithVIPChannel=false

展开
收起
游客4aoanourpdism 2021-01-19 13:43:33 2072 0
1 条回答
写回答
取消 提交回答
  • java.lang.RuntimeException: org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to failed at com.google.common.base.Throwables.propagate(Throwables.java:160) at org.apache.rocketmq.console.task.DashboardCollectTask.collectTopic(DashboardCollectTask.java:156) at org.apache.rocketmq.console.task.DashboardCollectTask FastClassBySpringCGLIB c818b8cd.invoke( ) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) at org.apache.rocketmq.console.aspect.admin.MQAdminAspect.aroundMQAdminMethod(MQAdminAspect.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)

    目前我用的rocketmq-console的版本是1.0.1 按理说我在application.properties中配置了

    rocketmq.config.namesrvAddr=localhost:9876 并且他的默认值就是localhost:9876,不应该报错connect to ,网上的大部分解决方案都是网络原因,打开防火墙就可以了,但是我的rocketmq与控制台都部署在同一个电脑上不应该出现防火墙问题,后来我尝试在启动脚本后加上namesrv的配置,问题解决了启动脚本如下:

    java -jar rocketmq-console-ng-1.0.1.jar --rocketmq.config.namesrvAddr=localhost:9876

    问题完美解决,如果您想用idea直接启动,可以在启动配置中加如下配置:

    2021-02-24 17:50:38
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
行业实践:RocketMQ 业务集成典型行业应用和实践 立即下载
技术揭秘:RocketMQ 5.0 云原生架构升级之路 立即下载
DTS控制台一本通 立即下载