环境:
Spring Boot 2.2.1,RocketMQ 4.7.0,centOS 7
异常信息:
org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout
解决方法:
#进入rocketmq/conf目录,在broker.conf文件中添加配置
brokerIP1 = 192.XXX.7.201【宿主机IP,自行修改】
#加载新修改的配置文件broker.conf重新启动broker(先关闭原有broker)
nohup sh mqbroker -n 192.XXX.7.201:9876 -c /usr/local/rocketmq/conf/broker.conf &
# 1.启动Nameserver(首先进入mq安装目录下的bin目录)
nohup sh mqnamesrv &
# 2.查看启动日志
tail -f ~/logs/rocketmqlogs/namesrv.log
# 3.启动Broker(首先进入mq安装目录下的bin目录)
nohup sh mqbroker -n 192.xxx.xxx.xxx:9876 &
# 4.查看启动日志
tail -f ~/logs/rocketmqlogs/broker.log
# 停止RocketMQ命令
nohup sh mqshutdown namesrv
nohup sh mqshutdown broker
原因分析:
1.原先我启动命令是:nohup sh mqbroker -n localhost:9876 localhost导致远程连接不到
2.修改完配置文件没有通过 -c 加载配置文件去启动broker