当前位置:   article > 正文

rocketmq问题集合_org.apache.rocketmq.client.exception.mqclientexcep

org.apache.rocketmq.client.exception.mqclientexception: send [3] times, stil

1 本地启动项目连接不上broker

启动时,控制台不断的提示远程连接失败

RocketmqRemoting                         : closeChannel: close the connection to remote address[] result: true
  • 1

发送message时报错

org.apache.rocketmq.client.exception.MQClientException: Send [3] times, still failed, cost [8232]ms, Topic: orderTopic, BrokersSent: [broker-a, broker-a, broker-a]
See http://rocketmq.apache.org/docs/faq/ for further details.
org.apache.rocketmq.client.exception.MQClientException: Send [3] times, still failed, cost [9183]ms, Topic: orderTopic, BrokersSent: [broker-a, broker-a, broker-a]
See http://rocketmq.apache.org/docs/faq/ for further details.
org.apache.rocketmq.client.exception.MQClientException: Send [3] times, still failed, cost [7219]ms, Topic: orderTopic, BrokersSent: [broker-a, broker-a, broker-a]
See http://rocketmq.apache.org/docs/faq/ for further details.
...
...
...
Caused by: org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 172.17.0.1:10911 failed
...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

解决方法:

broker.conf配置文件中设置brokerIP1

brokerClusterName = DefaultCluster
brokerName = broker-a
brokerIP1 = 47.107.37.*(公网ip)
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

重新启动broker服务

nohup sh mqbroker -n 47.107.37.*:9876 -c ../conf/broker.conf  &
  • 1

查看启动结果

cat nohup.out
The broker[broker-a, 47.107.37.*:10911] boot success. serializeType=JSON and name server is 47.107.37.*:9876
  • 1
  • 2

注:如果本地启动项目 ,还需要打开防火墙的10911端口,项目运行在服务器不会出现上述问题。

未完待续…

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/257008
推荐阅读
相关标签
  

闽ICP备14008679号