请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

工具配置成功并且启动成功了,但与springboot集成的时候一直报这个错误

回答3 浏览122 2020-10-13 12:12:17

工具配置成功并且启动成功了,但与springboot集成的时候一直报这个错误

{
    "timestamp": "2020-10-11T08:49:43.588+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "Send [3] times, still failed, cost [22]ms, Topic: add-bonus, BrokersSent: [DESKTOP-EUT35OQ, DESKTOP-EUT35OQ, DESKTOP-EUT35OQ]\nSee http://rocketmq.apache.org/docs/faq/ for further details.; nested exception is org.apache.rocketmq.client.exception.MQClientException: Send [3] times, still failed, cost [22]ms, Topic: add-bonus, BrokersSent: [DESKTOP-EUT35OQ, DESKTOP-EUT35OQ, DESKTOP-EUT35OQ]\nSee http://rocketmq.apache.org/docs/faq/ for further details.",
    "path": "/admin/shares/audit/2"
}
org.springframework.messaging.MessagingException: sendDefaultImpl call timeout; nested exception is org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout


2020-10-13 12:24:45 INFO main - tls.client.keyPassword = null
2020-10-13 12:24:45 INFO main - tls.client.certPath = null
2020-10-13 12:24:45 INFO main - tls.client.authServer = false
2020-10-13 12:24:45 INFO main - tls.client.trustCertPath = null
2020-10-13 12:24:46 INFO main - Using OpenSSL provider
2020-10-13 12:24:47 INFO main - SSLContext created for server
2020-10-13 12:24:47 INFO main - Try to start service thread:FileWatchService started:false lastThread:null
2020-10-13 12:24:47 INFO NettyEventExecutor - NettyEventExecutor service started
2020-10-13 12:24:47 INFO main - The Name Server boot success. serializeType=JSON
2020-10-13 12:24:47 INFO FileWatchService - FileWatchService service started
2020-10-13 12:25:00 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:49652
2020-10-13 12:25:00 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:49652]
2020-10-13 12:25:00 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:49652]
2020-10-13 12:25:00 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:49652]
2020-10-13 12:25:30 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:49654
2020-10-13 12:25:30 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:49654]
2020-10-13 12:25:30 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:49654]
2020-10-13 12:25:30 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:49654]
2020-10-13 12:25:42 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelRegistered 47.101.167.214:52582
2020-10-13 12:25:42 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelActive, the channel[47.101.167.214:52582]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new topic registered, RMQ_SYS_TRANS_HALF_TOPIC QueueData [brokerName=iZuf6h6yzsw5uybsq1y7w8Z, readQueueNums=1, writeQueueNums=1, perm=6, topicSynFlag=0]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new topic registered, BenchmarkTest QueueData [brokerName=iZuf6h6yzsw5uybsq1y7w8Z, readQueueNums=1024, writeQueueNums=1024, perm=6, topicSynFlag=0]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new topic registered, OFFSET_MOVED_EVENT QueueData [brokerName=iZuf6h6yzsw5uybsq1y7w8Z, readQueueNums=1, writeQueueNums=1, perm=6, topicSynFlag=0]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new topic registered, iZuf6h6yzsw5uybsq1y7w8Z QueueData [brokerName=iZuf6h6yzsw5uybsq1y7w8Z, readQueueNums=1, writeQueueNums=1, perm=7, topicSynFlag=0]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new topic registered, TBW102 QueueData [brokerName=iZuf6h6yzsw5uybsq1y7w8Z, readQueueNums=8, writeQueueNums=8, perm=7, topicSynFlag=0]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new topic registered, SELF_TEST_TOPIC QueueData [brokerName=iZuf6h6yzsw5uybsq1y7w8Z, readQueueNums=1, writeQueueNums=1, perm=6, topicSynFlag=0]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new topic registered, DefaultCluster QueueData [brokerName=iZuf6h6yzsw5uybsq1y7w8Z, readQueueNums=16, writeQueueNums=16, perm=7, topicSynFlag=0]
2020-10-13 12:25:42 INFO RemotingExecutorThread_4 - new broker registered, 172.19.172.31:10911 HAServer: 172.19.172.31:10912
2020-10-13 12:25:47 INFO NSScheduledThread1 - --------------------------------------------------------
2020-10-13 12:25:47 INFO NSScheduledThread1 - configTable SIZE: 0
2020-10-13 12:26:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:49658
2020-10-13 12:26:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:49658]
2020-10-13 12:26:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:49658]
2020-10-13 12:26:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:49658]
2020-10-13 12:26:28 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelRegistered 36.7.84.116:61751
2020-10-13 12:26:28 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelActive, the channel[36.7.84.116:61751]
2020-10-13 12:26:28 INFO NettyServerCodecThread_6 - NETTY SERVER PIPELINE: channelRegistered 36.7.84.116:61750
2020-10-13 12:26:28 INFO NettyServerCodecThread_6 - NETTY SERVER PIPELINE: channelActive, the channel[36.7.84.116:61750]
2020-10-13 12:26:30 INFO NettyServerCodecThread_7 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:49662
2020-10-13 12:26:30 INFO NettyServerCodecThread_7 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:49662]
2020-10-13 12:26:30 INFO NettyServerCodecThread_7 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:49662]
2020-10-13 12:26:30 INFO NettyServerCodecThread_7 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:49662]
2020-10-13 12:26:37 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelInactive, the channel[36.7.84.116:61751]
2020-10-13 12:26:37 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelUnregistered, the channel[36.7.84.116:61751]
2020-10-13 12:26:40 INFO NettyServerCodecThread_6 - NETTY SERVER PIPELINE: channelInactive, the channel[36.7.84.116:61750]
2020-10-13 12:26:40 INFO NettyServerCodecThread_6 - NETTY SERVER PIPELINE: channelUnregistered, the channel[36.7.84.116:61750]
2020-10-13 12:27:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:49666
2020-10-13 12:27:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:49666]
2020-10-13 12:27:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:49666]
2020-10-13 12:27:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:49666]
2020-10-13 12:20:02 INFO main - The broker[iZuf6h6yzsw5uybsq1y7w8Z, 172.19.172.31:10911] boot success. serializeType=JSON and name server is 172.19.172.31:9876
2020-10-13 12:20:11 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:20:11 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:20:12 INFO brokerOutApi_thread_2 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:20:42 INFO brokerOutApi_thread_3 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:21:11 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:21:11 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:21:12 INFO brokerOutApi_thread_4 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:21:42 INFO brokerOutApi_thread_1 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:22:11 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:22:11 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:22:12 INFO brokerOutApi_thread_2 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:22:42 INFO brokerOutApi_thread_3 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:23:11 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:23:11 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:23:12 INFO brokerOutApi_thread_4 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:23:40 INFO ShutdownHook - Shutdown hook was invoked, 1
2020-10-13 12:23:40 INFO ShutdownHook - Try to shutdown service thread:PullRequestHoldService started:true lastThread:Thread[PullRequestHoldService,5,main]
2020-10-13 12:23:40 INFO ShutdownHook - shutdown thread PullRequestHoldService interrupt false
2020-10-13 12:23:40 INFO PullRequestHoldService - PullRequestHoldService service end
2020-10-13 12:23:40 INFO ShutdownHook - join thread PullRequestHoldService eclipse time(ms) 2 90000
2020-10-13 12:23:42 INFO brokerOutApi_thread_1 - register broker[0]to name server 172.19.172.31:9876 OK
2020-10-13 12:23:44 INFO ShutdownHook - Try to shutdown service thread:FileWatchService started:true lastThread:Thread[FileWatchService,5,main]
2020-10-13 12:23:44 INFO ShutdownHook - shutdown thread FileWatchService interrupt false
2020-10-13 12:23:44 INFO FileWatchService - FileWatchService service end
2020-10-13 12:23:44 INFO ShutdownHook - join thread FileWatchService eclipse time(ms) 0 90000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:HAClient started:true lastThread:Thread[HAClient,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread HAClient interrupt false
2020-10-13 12:23:45 INFO ShutdownHook - join thread HAClient eclipse time(ms) 1 90000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:AcceptSocketService started:true lastThread:Thread[AcceptSocketService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread AcceptSocketService interrupt true
2020-10-13 12:23:45 INFO ShutdownHook - join thread AcceptSocketService eclipse time(ms) 0 90000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:GroupTransferService started:true lastThread:Thread[GroupTransferService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread GroupTransferService interrupt false
2020-10-13 12:23:45 INFO ShutdownHook - join thread GroupTransferService eclipse time(ms) 1 90000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:StoreStatsService started:true lastThread:Thread[StoreStatsService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread StoreStatsService interrupt false
2020-10-13 12:23:45 INFO ShutdownHook - join thread StoreStatsService eclipse time(ms) 0 90000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:FlushRealTimeService started:true lastThread:Thread[FlushRealTimeService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread FlushRealTimeService interrupt false
2020-10-13 12:23:45 INFO ShutdownHook - join thread FlushRealTimeService eclipse time(ms) 0 300000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:ReputMessageService started:true lastThread:Thread[ReputMessageService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread ReputMessageService interrupt false
2020-10-13 12:23:45 INFO ShutdownHook - join thread ReputMessageService eclipse time(ms) 14 90000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:FlushConsumeQueueService started:true lastThread:Thread[FlushConsumeQueueService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread FlushConsumeQueueService interrupt false
2020-10-13 12:23:45 INFO ShutdownHook - join thread FlushConsumeQueueService eclipse time(ms) 26 60000
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:AllocateMappedFileService started:true lastThread:Thread[AllocateMappedFileService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread AllocateMappedFileService interrupt true
2020-10-13 12:23:45 INFO ShutdownHook - join thread AllocateMappedFileService eclipse time(ms) 1 90000
2020-10-13 12:23:45 INFO ShutdownHook - unregisterBroker OK, NamesrvAddr: 172.19.172.31:9876
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:FileWatchService started:false lastThread:Thread[FileWatchService,5,]
2020-10-13 12:23:45 INFO ShutdownHook - Try to shutdown service thread:TransactionalMessageCheckService started:true lastThread:Thread[TransactionalMessageCheckService,5,main]
2020-10-13 12:23:45 INFO ShutdownHook - shutdown thread TransactionalMessageCheckService interrupt false
2020-10-13 12:23:45 INFO ShutdownHook - join thread TransactionalMessageCheckService eclipse time(ms) 8 90000
2020-10-13 12:23:45 INFO ShutdownHook - Shutdown hook over, consuming total time(ms): 5132
^C
[1]+ 退出 143 nohup sh bin/mqbroker -n 172.19.172.31:9876
[root@iZuf6h6yzsw5uybsq1y7w8Z rocketmq-all-4.5.1-bin-release]# nohup sh bin/mqbroker -n 47.101.167.214:9876 &
[1] 2850
[root@iZuf6h6yzsw5uybsq1y7w8Z rocketmq-all-4.5.1-bin-release]# nohup: 忽略输入并把输出追加到"nohup.out"

[root@iZuf6h6yzsw5uybsq1y7w8Z rocketmq-all-4.5.1-bin-release]# tail -f ~/logs/rocketmqlogs/broker.log
2020-10-13 12:25:41 INFO main - Try to start service thread:FlushConsumeQueueService started:false lastThread:null
2020-10-13 12:25:41 INFO main - Try to start service thread:FlushRealTimeService started:false lastThread:null
2020-10-13 12:25:41 INFO main - Try to start service thread:StoreStatsService started:false lastThread:null
2020-10-13 12:25:42 INFO main - Try to start service thread:FileWatchService started:false lastThread:null
2020-10-13 12:25:42 INFO main - Try to start service thread:PullRequestHoldService started:false lastThread:null
2020-10-13 12:25:42 INFO FileWatchService - FileWatchService service started
2020-10-13 12:25:42 INFO PullRequestHoldService - PullRequestHoldService service started
2020-10-13 12:25:42 INFO main - Try to start service thread:TransactionalMessageCheckService started:false lastThread:null
2020-10-13 12:25:43 INFO brokerOutApi_thread_1 - register broker[0]to name server 47.101.167.214:9876 OK
2020-10-13 12:25:43 INFO main - The broker[iZuf6h6yzsw5uybsq1y7w8Z, 172.19.172.31:10911] boot success. serializeType=JSON and name server is 47.101.167.214:9876
2020-10-13 12:25:51 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:25:51 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:25:53 INFO brokerOutApi_thread_2 - register broker[0]to name server 47.101.167.214:9876 OK
2020-10-13 12:26:23 INFO brokerOutApi_thread_3 - register broker[0]to name server 47.101.167.214:9876 OK
2020-10-13 12:26:51 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:26:51 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:26:53 INFO brokerOutApi_thread_4 - register broker[0]to name server 47.101.167.214:9876 OK
2020-10-13 12:27:23 INFO brokerOutApi_thread_1 - register broker[0]to name server 47.101.167.214:9876 OK
2020-10-13 12:27:51 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:27:51 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:27:53 INFO brokerOutApi_thread_2 - register broker[0]to name server 47.101.167.214:9876 OK
2020-10-13 12:28:23 INFO brokerOutApi_thread_3 - register broker[0]to name server 47.101.167.214:9876 OK
2020-10-13 12:28:51 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2020-10-13 12:28:51 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
2020-10-13 12:28:53 INFO brokerOutApi_thread_4 - register broker[0]to name server 47.101.167.214:9876 OK
org.springframework.messaging.MessagingException: sendDefaultImpl call timeout; nested exception is org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout

	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:194)
	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:126)
	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:114)
	at org.apache.rocketmq.spring.core.RocketMQTemplate.doSend(RocketMQTemplate.java:514)
	at org.apache.rocketmq.spring.core.RocketMQTemplate.doSend(RocketMQTemplate.java:53)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:151)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:129)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:122)
	at com.rocket.pro.rocketpro.RocketProApplicationTests.contextLoads(RocketProApplicationTests.java:25)
	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)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
	at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
Caused by: 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.producer.DefaultMQProducer.send(DefaultMQProducer.java:358)
	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:188)
	... 39 more

添加回答

已采纳回答

经过线下沟通,发现问题存在,能复现。

部署环境:

  1. RocketMQ在阿里云服务器 

  2. 测试代码在本机,代码如下:

@Autowired
private RocketMQTemplate rocketMQTemplate;
@Test
public void contextLoads() {
   Map<String,Object>map=new HashMap<>();
   map.put("name","jack");
   map.put("age","20");
   rocketMQTemplate.convertAndSend("test-rocket-info",map);
}

解决方案:

  1. 修改broker.conf,内容如下:

brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
namesrvAddr=47.101.167.214:9876
listenPort=10911
brokerIP1=47.101.167.214

这里的47.101.167.214是公网IP

2. 启动Name Server:

nohup sh bin/mqnamesrv &

3. 启动Broker:

nohup sh bin/mqbroker -n 47.101.167.214:9876 -c conf/broker.conf &

=======

定位问题的过程:

  1. 在GitHub上找到了相同问题: https://github.com/apache/rocketmq/issues/568 ,里面说要么设置setVipChannelEnabled,要么开放10911、10909这两个端口。

  2. 而测试代码使用的是RocketMQTemplate玩的,无法直接操作setVipChannelEnabled,所以不妨顺着第二条路走(开放10911、10909这两个端口)

然而,我发现在本机telnet 10911、10909这两个端口是通的,说明端口开放没问题。

====

陷入僵局后,我就分析nohup日志,发现有类似如下的日志:

The broker[iZuf6h6yzsw5uybsq1y7w8Z, 172.19.172.31:10911] boot success. serializeType=JSON and name server is 47.101.167.214:9876

也就是说,broker启动时,往Name Server注册的是个内网地址(172.19.172.31),而我们希望是公网地址。所以,修改下broker.conf,设置下IP;并在启动broker时,用-c conf/broker.conf 指定读取配置文件。

此时,会打印类似如下的日志,和预期相符。

The broker[broker-a, 47.101.167.214:10911] boot success. serializeType=JSON and name server is 47.101.167.214:9876

=====

注意点:

  1. 需要开放10911、10909这两个端口

  2. 需修改broker.conf,设置公网IP

  3. 启动broker时,需用-c conf/broker.conf,读取配置文件

2020-10-13 16:04:22

2回答

Spring Cloud Alibaba微服务从入门到进阶

难度高级
时长18小时
人数1901
好评度99.8%

面向未来微服务:熟练掌握Spring Cloud Alibaba

讲师

大目 架构师

9年软件系统开发经验,多年系统架构经验。参与开发/架构多个大型项目,对Spring Cloud、微服务、持续集成、持续交付、容器生态圈常用组件均有涉猎。著有《Spring Cloud与Docker微服务架构实战》一书,是2017年十佳畅销书,同类书籍排名前列。

意见反馈 帮助中心 APP下载
官方微信