rg.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout

The error message is as follows:

Exception in thread "main" org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:640)
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1310)
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1256)
	at org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:339)
	at com.dream21th.rocketmq.producer.ProducerSync.main(ProducerSync.java:29)

Debug the code and found 172.31.152.219
insert image description here
that the ip address of the rocketmq connection is the rocketmq deployed by Alibaba Cloud. We logged in to the server and found that the ip of the intranet was consistent with the above. So it cannot be accessed through the Internet.
insert image description here
Write a broker.properties file through the following command, and specify ip

[root@iZm5e8xpme70yxqoa4zoydZ conf]# pwd
/home/app/rocketmq/conf
[root@iZm5e8xpme70yxqoa4zoydZ conf]# echo brokerIP1=118.190.62.94 >> broker.properties
    重新启动broker,再次运行代码正常
[root@iZm5e8xpme70yxqoa4zoydZ conf]# mqbroker -n 118.190.62.94:9876 -c broker.properties &

Guess you like

Origin blog.csdn.net/qq_36305027/article/details/127492481