给团队部署一个rocketmq4.8.0. k8s上部署的broker,注册到nameserver上是自己的pod ip,导致本机连接到的broker的pod ip,这个ip k8s集群外的机器是无法联通的。
nameserver上注册的是这个pod ipv4
尝试将broker的配置brokerIP1修改为注册到nameserver的地址
重启nameserver和broker,不奏效,本地向rocketmq发消息报连接不上
2025-01-08 17:03:25.169 | INFO 32076 | nacos-grpc-client-executor-4 [TID: N/A] com.alibaba.nacos.common.remote.client | [6e06ea08-7717-47b9-9b62-c809f6217131] Receive server push request, request = NotifySubscriberRequest, requestId = 289848
2025-01-08 17:03:25.172 | INFO 32076 | nacos-grpc-client-executor-4 [TID: N/A] com.alibaba.nacos.common.remote.client | [6e06ea08-7717-47b9-9b62-c809f6217131] Ack server push request, request = NotifySubscriberRequest, requestId = 289848
2025-01-08 17:03:29.723 | INFO 32076 | NettyClientSelector_1 [TID: N/A] RocketmqRemoting | closeChannel: close the connection to remote address[172.30.44.214:10911] result: true
2025-01-08 17:03:29.724 | ERROR 32076 | main [TID: N/A] o.a.r.spring.core.RocketMQTemplate | syncSend failed. destination:test, message:GenericMessage [payload=test, headers={id=1a78a0c1-bfe6-9aa4-44b3-62f6cc3fb320, timestamp=1736327006557}] org.springframework.messaging.MessagingException: sendDefaultImpl call timeout; nested exception is org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeoutat org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:197)at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:129)at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:117)at org.apache.rocketmq.spring.core.RocketMQTemplate.doSend(RocketMQTemplate.java:513)at org.apache.rocketmq.spring.core.RocketMQTemplate.doSend(RocketMQTemplate.java:53)at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)at com.byd.bigdata.assistant.web.RocketMQTest.sendTest(RocketMQTest.java:19)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.base/java.lang.reflect.Method.invoke(Method.java:568)at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)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:366)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$4.run(ParentRunner.java:331)at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)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$3.evaluate(ParentRunner.java:306)at org.junit.runners.ParentRunner.run(ParentRunner.java:413)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$1.execute(IdeaTestRunner.java:38)at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeoutat 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:189)... 39 more
k8s部署中间件,除了容器访问网络磁盘会导致性能问题外,还需要考虑注册到nameserver的是pod ip,导致开发环境连接不上的问题。