RocketMQ部署时遇到的问题

1、Java代码中启动Producer时报错:No route info of this topic;

解决方案:自行百度即可,他们说的对;

2、上述问题解决后,发送消息时报错:RemotingTooMuchRequestException: sendDefaultImpl call timeout;

解决方案:服务器存在多网卡,在broker的配置文件中指定 brokerIP 参数的ip地址即可;

3、在一台机器上以双master-noslave模式部署时报错:RocketMq Lock failed,MQ already started;

解决方案:修改其中一个broker配置文件的 各种存储路径参数 ;

4、单机下,双master-noslave模式部署时报错:java.net.BindException: 地址已在使用;

解决方案:查看启动成功的broker端口号(默认为10911),在未启动成功的broker配置文件中指定 listenPort 参数为其他端口;

单机下以 2m-noslave模式部署,一个broker配置文件采用默认配置,另一个broker配置需至少修改如下参数:

brokerName=broker_9877
brokerId=0
namesrvAddr=rocketmq-nameserver-1:9877;rocketmq-nameserver-2:9876
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
brokerIP1=10.8.1.212
brokerIP2=172.17.0.1
storePathRootDir=~/logs/rocketmqstore
storePathCommitLog=~/logs/rocketmqstore/commitlog
storePathConsumeQueue=~/logs/rocketmqstore/consumequeue
storePathIndex=~/logs/rocketmqstore/index
storeCheckpoint=~/logs/rocketmqstore/checkpoint
abortFile=~/logs/rocketmqstore/abort
listenPort=10010

你可能感兴趣的:(RocketMQ部署时遇到的问题)