apache / rocketmq-clients

RocketMQ Clients - Collection of Client Bindings for Apache RocketMQ
https://rocketmq.apache.org/
Apache License 2.0
305 stars 202 forks source link

[Bug] Using `rocketmq-client-java` appears: Expected the service ProducerImpl-0 [FAILED] to be RUNNING, but the service has FAILED #742

Closed JanYork closed 4 months ago

JanYork commented 4 months ago

Before Creating the Bug Report

Programming Language of the Client

Java

Runtime Platform Environment

Macos、JDK17

RocketMQ Version of the Client/Server

RocketMQ Server Version:5.2.0

RocketMQ Client Version:rocketmq-client-java 5.0.6

Run or Compiler Version

JDK17

Describe the Bug

Using the rocketmq-client-java SDK to send message production requests to RocketMQ, the following error occurs:

Exception in thread "main" java.lang.IllegalStateException: Expected the service ProducerImpl-0 [FAILED] to be RUNNING, but the service has FAILED
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:381)
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:305)
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService.awaitRunning(AbstractIdleService.java:165)
    at org.apache.rocketmq.client.java.impl.producer.ProducerBuilderImpl.build(ProducerBuilderImpl.java:93)
    at com.example.springdemo.mq.ProducerSingleton.buildProducer(ProducerSingleton.java:52)
    at com.example.springdemo.mq.ProducerSingleton.getInstance(ProducerSingleton.java:59)
    at com.example.springdemo.mq.MessageProducer.main(MessageProducer.java:25)
Caused by: java.util.concurrent.ExecutionException: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567)
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
    at org.apache.rocketmq.client.java.impl.ClientImpl.startUp(ClientImpl.java:188)
    at org.apache.rocketmq.client.java.impl.producer.ProducerImpl.startUp(ProducerImpl.java:114)
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
    at org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:103)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
    at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539)
    at org.apache.rocketmq.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544)
    at org.apache.rocketmq.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
    at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
    at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
    at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563)
    at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
    at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744)
    at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723)
    at org.apache.rocketmq.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at org.apache.rocketmq.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    ... 1 more

Error log from namesrv.log:

2024-05-02 14:40:57 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelRegistered 172.19.0.2:38410
2024-05-02 14:41:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelActive, the channel[172.19.0.2:38410]
2024-05-02 14:41:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelInactive, the channel[172.19.0.2:38410]
2024-05-02 14:41:00 INFO NettyServerCodecThread_8 - NETTY SERVER PIPELINE: channelUnregistered, the channel[172.19.0.2:38410]
2024-05-02 14:41:02 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:07 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:12 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:17 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:22 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:27 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:27 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelRegistered 192.168.65.1:58493
2024-05-02 14:41:27 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelActive, the channel[192.168.65.1:58493]
2024-05-02 14:41:27 ERROR NettyServerCodecThread_1 - decode exception, 192.168.65.1:58493
io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 16777216: 1347569956 - discarded
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:503)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:489)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.exceededFrameLength(LengthFieldBasedFrameDecoder.java:376)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:419)
    at org.apache.rocketmq.remoting.netty.NettyDecoder.decode(NettyDecoder.java:44)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:332)
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    at org.apache.rocketmq.remoting.netty.NettyRemotingServer$TlsModeHandler.channelRead0(NettyRemotingServer.java:543)
    at org.apache.rocketmq.remoting.netty.NettyRemotingServer$TlsModeHandler.channelRead0(NettyRemotingServer.java:490)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:253)
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:514)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
    at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
    at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:41:27 INFO NettyServerNIOSelector_2 - closeChannel: close the connection to remote address[192.168.65.1:58493] result: true
2024-05-02 14:41:27 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelInactive, the channel[192.168.65.1:58493]
2024-05-02 14:41:27 INFO NettyServerCodecThread_1 - NETTY SERVER PIPELINE: channelUnregistered, the channel[192.168.65.1:58493]
2024-05-02 14:41:30 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelRegistered 172.19.0.2:47458
2024-05-02 14:41:30 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelActive, the channel[172.19.0.2:47458]
2024-05-02 14:41:30 WARN RemotingExecutorThread_10 - getAllTopicListFromNameserver /172.19.0.2:47458 enable true
2024-05-02 14:41:32 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:37 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:40 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelInactive, the channel[172.19.0.2:47458]
2024-05-02 14:41:40 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelUnregistered, the channel[172.19.0.2:47458]
2024-05-02 14:41:42 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:47 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:52 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelRegistered 192.168.65.1:58530
2024-05-02 14:41:52 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelActive, the channel[192.168.65.1:58530]
2024-05-02 14:41:52 ERROR NettyServerCodecThread_3 - decode exception, 192.168.65.1:58530
io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 16777216: 1347569956 - discarded
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:503)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:489)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.exceededFrameLength(LengthFieldBasedFrameDecoder.java:376)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:419)
    at org.apache.rocketmq.remoting.netty.NettyDecoder.decode(NettyDecoder.java:44)
    at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:332)
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    at org.apache.rocketmq.remoting.netty.NettyRemotingServer$TlsModeHandler.channelRead0(NettyRemotingServer.java:543)
    at org.apache.rocketmq.remoting.netty.NettyRemotingServer$TlsModeHandler.channelRead0(NettyRemotingServer.java:490)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:253)
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:514)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
    at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
    at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:41:52 INFO NettyServerNIOSelector_1 - closeChannel: close the connection to remote address[192.168.65.1:58530] result: true
2024-05-02 14:41:52 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelInactive, the channel[192.168.65.1:58530]
2024-05-02 14:41:52 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelUnregistered, the channel[192.168.65.1:58530]
2024-05-02 14:41:52 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:57 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:41:59 WARN NettyClientWorkerThread_3 - NETTY CLIENT PIPELINE: IDLE exception [172.19.0.3:9876]
2024-05-02 14:41:59 INFO NettyClientWorkerThread_3 - closeChannel: the channel[172.19.0.3:9876] was removed from channel table
2024-05-02 14:41:59 INFO NettyClientWorkerThread_3 - NETTY CLIENT PIPELINE: CLOSE 172.19.0.3:9876
2024-05-02 14:41:59 INFO NettyClientWorkerThread_3 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:41:59 INFO NettyClientSelector_1 - closeChannel: close the connection to remote address[172.19.0.3:9876] result: true
2024-05-02 14:41:59 INFO NettyClientWorkerThread_3 - NETTY CLIENT PIPELINE: channelInactive, the channel[172.19.0.3:9876]
2024-05-02 14:41:59 INFO NettyClientWorkerThread_3 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:41:59 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelInactive, the channel[172.19.0.3:55644]
2024-05-02 14:41:59 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelUnregistered, the channel[172.19.0.3:55644]
2024-05-02 14:42:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelRegistered 172.19.0.2:45844
2024-05-02 14:42:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelActive, the channel[172.19.0.2:45844]
2024-05-02 14:42:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelInactive, the channel[172.19.0.2:45844]
2024-05-02 14:42:00 INFO NettyServerCodecThread_4 - NETTY SERVER PIPELINE: channelUnregistered, the channel[172.19.0.2:45844]
2024-05-02 14:42:00 INFO NettyClientScan_thread_2 - createChannel: begin to connect remote host[172.19.0.3:9876] asynchronously
2024-05-02 14:42:00 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CONNECT  UNKNOWN => 172.19.0.3:9876
2024-05-02 14:42:00 INFO NettyClientScan_thread_2 - createChannel: connect remote host[172.19.0.3:9876] success, AbstractBootstrap$PendingRegistrationPromise@61cd1078(success)
2024-05-02 14:42:00 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: ACTIVE, 172.19.0.3:9876
2024-05-02 14:42:00 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelRegistered 172.19.0.3:34814
2024-05-02 14:42:00 INFO NettyServerCodecThread_5 - NETTY SERVER PIPELINE: channelActive, the channel[172.19.0.3:34814]
2024-05-02 14:42:02 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:42:07 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:42:12 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:42:17 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:42:22 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:42:27 INFO NSScanScheduledThread - start scanNotActiveBroker
2024-05-02 14:42:30 INFO NettyServerCodecThread_6 - NETTY SERVER PIPELINE: channelRegistered 172.19.0.2:40356
2024-05-02 14:42:30 INFO NettyServerCodecThread_6 - NETTY SERVER PIPELINE: channelActive, the channel[172.19.0.2:40356]
2024-05-02 14:42:30 WARN RemotingExecutorThread_15 - getAllTopicListFromNameserver /172.19.0.2:40356 enable true
2024-05-02 14:42:32 INFO NSScanScheduledThread - start scanNotActiveBroker

Error log from broker remoting.log:

2024-05-02 14:56:12 INFO NettyClientWorkerThread_4 - closeChannel: the channel[localhost:9876] was removed from channel table
2024-05-02 14:56:12 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:12 INFO NettyClientWorkerThread_4 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:56:12 ERROR BrokerControllerScheduledThread1 - getAndCreateNameserverChannel: create name server channel exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to [localhost:9876] failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateNameserverChannel(NettyRemotingClient.java:663)
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateChannel(NettyRemotingClient.java:618)
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:541)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:56:14 INFO NettyClientScan_thread_4 - createChannel: begin to connect remote host[localhost:9876] asynchronously
2024-05-02 14:56:14 INFO NettyClientWorkerThread_1 - NETTY CLIENT PIPELINE: CONNECT  UNKNOWN => 127.0.0.1:9876
2024-05-02 14:56:14 WARN NettyClientScan_thread_4 - createChannel: connect remote host[localhost:9876] failed, AbstractBootstrap$PendingRegistrationPromise@79da8429(failure: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:9876)
2024-05-02 14:56:14 INFO NettyClientWorkerThread_1 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:14 INFO NettyClientWorkerThread_1 - closeChannel: the channel[localhost:9876] was removed from channel table
2024-05-02 14:56:14 INFO NettyClientWorkerThread_1 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:14 INFO NettyClientWorkerThread_1 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:56:14 INFO NettyClientScan_thread_4 - createChannel: begin to connect remote host[localhost:9876] asynchronously
2024-05-02 14:56:14 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CONNECT  UNKNOWN => 127.0.0.1:9876
2024-05-02 14:56:14 WARN NettyClientScan_thread_4 - createChannel: connect remote host[localhost:9876] failed, AbstractBootstrap$PendingRegistrationPromise@3946474c(failure: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:9876)
2024-05-02 14:56:14 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:14 INFO NettyClientWorkerThread_4 - closeChannel: the channel[localhost:9876] was removed from channel table
2024-05-02 14:56:14 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:14 INFO NettyClientWorkerThread_4 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:56:17 INFO BrokerControllerScheduledThread1 - new name server is chosen. OLD: localhost:9876 , NEW: localhost:9876. namesrvIndex = 1180
2024-05-02 14:56:17 INFO BrokerControllerScheduledThread1 - createChannel: begin to connect remote host[localhost:9876] asynchronously
2024-05-02 14:56:17 INFO NettyClientWorkerThread_2 - NETTY CLIENT PIPELINE: CONNECT  UNKNOWN => 127.0.0.1:9876
2024-05-02 14:56:17 WARN BrokerControllerScheduledThread1 - createChannel: connect remote host[localhost:9876] failed, AbstractBootstrap$PendingRegistrationPromise@6f0143d9(failure: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:9876)
2024-05-02 14:56:17 INFO NettyClientWorkerThread_2 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:17 INFO NettyClientWorkerThread_2 - closeChannel: the channel[localhost:9876] was removed from channel table
2024-05-02 14:56:17 INFO NettyClientWorkerThread_2 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:17 INFO NettyClientWorkerThread_2 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:56:17 ERROR BrokerControllerScheduledThread1 - getAndCreateNameserverChannel: create name server channel exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to [localhost:9876] failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateNameserverChannel(NettyRemotingClient.java:663)
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateChannel(NettyRemotingClient.java:618)
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:541)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:56:17 INFO NettyClientScan_thread_1 - createChannel: begin to connect remote host[localhost:9876] asynchronously
2024-05-02 14:56:17 INFO NettyClientWorkerThread_3 - NETTY CLIENT PIPELINE: CONNECT  UNKNOWN => 127.0.0.1:9876
2024-05-02 14:56:17 WARN NettyClientScan_thread_1 - createChannel: connect remote host[localhost:9876] failed, AbstractBootstrap$PendingRegistrationPromise@268c468(failure: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:9876)
2024-05-02 14:56:17 INFO NettyClientWorkerThread_3 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:17 INFO NettyClientWorkerThread_3 - closeChannel: the channel[localhost:9876] was removed from channel table
2024-05-02 14:56:17 INFO NettyClientWorkerThread_3 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:17 INFO NettyClientWorkerThread_3 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:56:18 INFO NettyClientScan_thread_1 - createChannel: begin to connect remote host[localhost:9876] asynchronously
2024-05-02 14:56:18 INFO NettyClientWorkerThread_1 - NETTY CLIENT PIPELINE: CONNECT  UNKNOWN => 127.0.0.1:9876
2024-05-02 14:56:18 WARN NettyClientScan_thread_1 - createChannel: connect remote host[localhost:9876] failed, AbstractBootstrap$PendingRegistrationPromise@4b00330f(failure: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:9876)
2024-05-02 14:56:18 INFO NettyClientWorkerThread_1 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:18 INFO NettyClientWorkerThread_1 - closeChannel: the channel[localhost:9876] was removed from channel table
2024-05-02 14:56:18 INFO NettyClientWorkerThread_1 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:18 INFO NettyClientWorkerThread_1 - eventCloseChannel: the channel[null] has been removed from the channel table before
2024-05-02 14:56:21 INFO NettyClientScan_thread_2 - createChannel: begin to connect remote host[localhost:9876] asynchronously
2024-05-02 14:56:21 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CONNECT  UNKNOWN => 127.0.0.1:9876
2024-05-02 14:56:21 WARN NettyClientScan_thread_2 - createChannel: connect remote host[localhost:9876] failed, AbstractBootstrap$PendingRegistrationPromise@710765e3(failure: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:9876)
2024-05-02 14:56:21 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:21 INFO NettyClientWorkerThread_4 - closeChannel: the channel[localhost:9876] was removed from channel table
2024-05-02 14:56:21 INFO NettyClientWorkerThread_4 - NETTY CLIENT PIPELINE: CLOSE 
2024-05-02 14:56:21 INFO NettyClientWorkerThread_4 - eventCloseChannel: the channel[null] has been removed from the channel table before

Error log from broker.log:

2024-05-02 14:56:36 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:56:37 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:56:41 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:56:42 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:56:46 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:56:47 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:56:51 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:56:52 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:56:56 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:56:57 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:01 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:02 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:06 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:07 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:10 INFO BrokerControllerScheduledThread1 - Dispatch task fall behind commit log 0bytes
2024-05-02 14:57:11 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:12 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:16 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:17 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:21 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:22 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:26 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:27 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:31 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:32 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:36 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:37 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:41 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:42 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:46 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:47 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
2024-05-02 14:57:51 INFO AclFileWatchService - The default acl dir /home/rocketmq/rocketmq-5.2.0/conf/acl is not exist
2024-05-02 14:57:52 ERROR BrokerControllerScheduledThread1 - ScheduledTask refresh metadata exception
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to null failed
    at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:570)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.getBrokerClusterInfo(BrokerOuterAPI.java:1160)
    at org.apache.rocketmq.broker.out.BrokerOuterAPI.refreshMetadata(BrokerOuterAPI.java:1179)
    at org.apache.rocketmq.broker.BrokerController$21.run(BrokerController.java:1702)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)

my broker.conf info:

# Broker的基本配置
brokerClusterName = DefaultCluster  # Broker所属的集群名称
brokerName = broker-a               # Broker的名称,标识不同的broker实例
brokerId = 0                        # Broker的ID,0表示Master,非0表示Slave
deleteWhen = 04                    # 文件删除时间点,格式为HH,此处设置为凌晨4点删除
fileReservedTime = 48               # 文件保留时间,单位小时
brokerRole = ASYNC_MASTER           # Broker角色,ASYNC_MASTER为异步复制Master
flushDiskType = ASYNC_FLUSH         # 刷盘方式,ASYNC_FLUSH为异步刷盘

# RocketMQ存储路径配置
storePathRootDir = /home/rocketmq/store        # 存储根目录
storePathCommitLog = /home/rocketmq/store/commitlog  # commitLog存储路径
storeCheckpoint = /home/rocketmq/store/checkpoint    # 存储检查点文件的路径
abortFile = /home/rocketmq/store/abort                # 异常终止文件路径

# 消息队列文件的配置
mapedFileSizeCommitLog = 1073741824    # commitLog文件大小,默认1GB
mapedFileSizeConsumeQueue = 300000     # 消费队列文件的大小,默认300KB
maxIndexNum = 5000000                  # 消息索引最大条目数

# Topic和队列配置
defaultTopicQueueNums=4      # 发送到默认Topic时,如果该Topic不存在,自动创建的队列数,默认为4
autoCreateTopicEnable=true   # 是否允许Broker自动创建客户端试图发送但不存在的Topic,默认为true

# 订阅组配置
autoCreateSubscriptionGroup=true  # 是否允许Broker自动创建客户端试图消费但不存在的订阅组,默认为true

maxMessageSize=10485760  # 设置消息最大为10MB
nettyMaxFrameSize=10485760  # 设置Netty框架的最大帧大小也为10MB

Steps to Reproduce

It's simple, first build a springboot project.

use it in maven:

        <dependency>
            <groupId>org.apache.rocketmq</groupId>
            <artifactId>rocketmq-client-java</artifactId>
            <version>5.0.6</version>
        </dependency>

the ProducerSingleton class:

package com.example.springdemo.mq;

import org.apache.rocketmq.client.apis.ClientConfiguration;
import org.apache.rocketmq.client.apis.ClientException;
import org.apache.rocketmq.client.apis.ClientServiceProvider;
import org.apache.rocketmq.client.apis.SessionCredentialsProvider;
import org.apache.rocketmq.client.apis.StaticSessionCredentialsProvider;
import org.apache.rocketmq.client.apis.producer.Producer;
import org.apache.rocketmq.client.apis.producer.ProducerBuilder;
import org.apache.rocketmq.client.apis.producer.TransactionChecker;

/**
 * Each client will establish an independent connection to the server node within a process.
 *
 * <p>In most cases, the singleton mode can meet the requirements of higher concurrency.
 * If multiple connections are desired, consider increasing the number of clients appropriately.
 */
public class ProducerSingleton {
    private static volatile Producer PRODUCER;
    private static volatile Producer TRANSACTIONAL_PRODUCER;
    private static final String ACCESS_KEY = "yourAccessKey";
    private static final String SECRET_KEY = "yourSecretKey";
    private static final String ENDPOINTS = "192.168.1.162:9876";

    private ProducerSingleton() {
    }

    private static Producer buildProducer(TransactionChecker checker, String... topics) throws ClientException {
        final ClientServiceProvider provider = ClientServiceProvider.loadService();
        // Credential provider is optional for client configuration.
        // This parameter is necessary only when the server ACL is enabled. Otherwise,
        // it does not need to be set by default.
        SessionCredentialsProvider sessionCredentialsProvider =
                new StaticSessionCredentialsProvider(ACCESS_KEY, SECRET_KEY);
        ClientConfiguration clientConfiguration = ClientConfiguration.newBuilder()
                .setEndpoints(ENDPOINTS)
                // On some Windows platforms, you may encounter SSL compatibility issues. Try turning off the SSL option in
                // client configuration to solve the problem please if SSL is not essential.
                .enableSsl(false)
                .setCredentialProvider(sessionCredentialsProvider)
                .build();
        final ProducerBuilder builder = provider.newProducerBuilder()
                .setClientConfiguration(clientConfiguration)
                // Set the topic name(s), which is optional but recommended. It makes producer could prefetch
                // the topic route before message publishing.
                .setTopics(topics);
        if (checker != null) {
            // Set the transaction checker.
            builder.setTransactionChecker(checker);
        }
        return builder.build();
    }

    public static Producer getInstance(String... topics) throws ClientException {
        if (null == PRODUCER) {
            synchronized (ProducerSingleton.class) {
                if (null == PRODUCER) {
                    PRODUCER = buildProducer(null, topics);
                }
            }
        }
        return PRODUCER;
    }

    public static Producer getTransactionalInstance(TransactionChecker checker,
                                                    String... topics) throws ClientException {
        if (null == TRANSACTIONAL_PRODUCER) {
            synchronized (ProducerSingleton.class) {
                if (null == TRANSACTIONAL_PRODUCER) {
                    TRANSACTIONAL_PRODUCER = buildProducer(checker, topics);
                }
            }
        }
        return TRANSACTIONAL_PRODUCER;
    }
}

the MessageProducer class:

package com.example.springdemo.mq;

import java.nio.charset.StandardCharsets;
import org.apache.rocketmq.client.apis.ClientException;
import org.apache.rocketmq.client.apis.ClientServiceProvider;
import org.apache.rocketmq.client.apis.message.Message;
import org.apache.rocketmq.client.apis.producer.Producer;
import org.apache.rocketmq.client.apis.producer.SendReceipt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author muyouzhi
 */
public class MessageProducer {
    private static final Logger log = LoggerFactory.getLogger(MessageProducer.class);

    private MessageProducer() {
    }

    public static void main(String[] args) throws ClientException {
        final ClientServiceProvider provider = ClientServiceProvider.loadService();

        String topic = "TopicTest";
        final Producer producer = ProducerSingleton.getInstance(topic);
        // Define your message body.
        byte[] body = "This is a normal message for Apache RocketMQ".getBytes(StandardCharsets.UTF_8);
        String tag = "yourMessageTagA";
        final Message message = provider.newMessageBuilder()
                // Set topic for the current message.
                .setTopic(topic)
                // Message secondary classifier of message besides topic.
                .setTag(tag)
                // Key(s) of the message, another way to mark message besides message id.
                .setKeys("yourMessageKey-1c151062f96e")
                .setBody(body)
                .build();
        try {
            final SendReceipt sendReceipt = producer.send(message);
            log.info("Send message successfully, messageId={}", sendReceipt.getMessageId());
        } catch (Throwable t) {
            log.error("Failed to send message", t);
        }
    }
}

then run main() in MessageProducer

You will see the error after

What Did You Expect to See?

a success message

What Did You See Instead?

/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/bin/java -javaagent:/Users/muyouzhi/Applications/IntelliJ IDEA Ultimate.app/Contents/lib/idea_rt.jar=58565:/Users/muyouzhi/Applications/IntelliJ IDEA Ultimate.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/muyouzhi/Code/demo/spring/spring-demo/target/classes:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.6.13/spring-boot-starter-web-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter/2.6.13/spring-boot-starter-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot/2.6.13/spring-boot-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.6.13/spring-boot-autoconfigure-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.6.13/spring-boot-starter-logging-2.6.13.jar:/Users/muyouzhi/.m2/repository/ch/qos/logback/logback-classic/1.2.11/logback-classic-1.2.11.jar:/Users/muyouzhi/.m2/repository/ch/qos/logback/logback-core/1.2.11/logback-core-1.2.11.jar:/Users/muyouzhi/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.17.2/log4j-to-slf4j-2.17.2.jar:/Users/muyouzhi/.m2/repository/org/apache/logging/log4j/log4j-api/2.17.2/log4j-api-2.17.2.jar:/Users/muyouzhi/.m2/repository/org/slf4j/jul-to-slf4j/1.7.36/jul-to-slf4j-1.7.36.jar:/Users/muyouzhi/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/muyouzhi/.m2/repository/org/yaml/snakeyaml/1.29/snakeyaml-1.29.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.6.13/spring-boot-starter-json-2.6.13.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.13.4.2/jackson-databind-2.13.4.2.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.13.4/jackson-annotations-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.13.4/jackson-core-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.13.4/jackson-datatype-jdk8-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.4/jackson-datatype-jsr310-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.13.4/jackson-module-parameter-names-2.13.4.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.6.13/spring-boot-starter-tomcat-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.68/tomcat-embed-core-9.0.68.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.68/tomcat-embed-el-9.0.68.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.68/tomcat-embed-websocket-9.0.68.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-web/5.3.23/spring-web-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-beans/5.3.23/spring-beans-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-webmvc/5.3.23/spring-webmvc-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-aop/5.3.23/spring-aop-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-context/5.3.23/spring-context-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-expression/5.3.23/spring-expression-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/apache/rocketmq/rocketmq-client-java/5.0.6/rocketmq-client-java-5.0.6.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/annotations-api/6.0.53/annotations-api-6.0.53.jar:/Users/muyouzhi/.m2/repository/org/projectlombok/lombok/1.18.24/lombok-1.18.24.jar:/Users/muyouzhi/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-core/5.3.23/spring-core-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-jcl/5.3.23/spring-jcl-5.3.23.jar com.example.springdemo.mq.MessageProducer Exception in thread "main" java.lang.IllegalStateException: Expected the service ProducerImpl-0 [FAILED] to be RUNNING, but the service has FAILED at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:381) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:305) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService.awaitRunning(AbstractIdleService.java:165) at org.apache.rocketmq.client.java.impl.producer.ProducerBuilderImpl.build(ProducerBuilderImpl.java:93) at com.example.springdemo.mq.ProducerSingleton.buildProducer(ProducerSingleton.java:52) at com.example.springdemo.mq.ProducerSingleton.getInstance(ProducerSingleton.java:59) at com.example.springdemo.mq.MessageProducer.main(MessageProducer.java:25) Caused by: java.util.concurrent.ExecutionException: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91) at org.apache.rocketmq.client.java.impl.ClientImpl.startUp(ClientImpl.java:188) at org.apache.rocketmq.client.java.impl.producer.ProducerImpl.startUp(ProducerImpl.java:114) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:103) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539) at org.apache.rocketmq.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544) at org.apache.rocketmq.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) at org.apache.rocketmq.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at org.apache.rocketmq.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ... 1 more

进程已结束,退出代码为 1

Additional Context

Hey, is the Grpc API of RocketMQ available? Why do I have this problem no matter if it is golang rocketmq sdk or java rocketmq sdk or nodejs rocketmq sdk? Why? ? ?

I don't think it's a server-side problem. I tried using docker to deploy, compile the source code and run it, and use the compiled binary file to run, but this error will appear.

The strange thing is that io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 16777216: 1347569956 - discarded This error should be impossible. There is no such a large message. I just transmitted a 35-byte message. Or is it a Netty serialization problem? I don't understand, why does it happen?

And why is the community of this project so inactive? It seems that no one will answer my questions.

xbhog commented 4 months ago

Has this issue been resolved? There is still a problem in 5.0.6

org.apache.rocketmq rocketmq-client-java 5.0.6
JanYork commented 4 months ago

Has this issue been resolved? There is still a problem in 5.0.6

org.apache.rocketmq rocketmq-client-java 5.0.6

There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy

xbhog commented 4 months ago

Has this issue been resolved? There is still a problem in 5.0.6

org.apache.rocketmq rocketmq-client-java 5.0.6

There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy

Understand, if I want to use this version of the client, I need to manually build the Proxy myself, right?

JanYork commented 4 months ago

Has this issue been resolved? There is still a problem in 5.0.6

org.apache.rocketmq rocketmq-client-java 5.0.6

There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy

Understand, if I want to use this version of the client, I need to manually build the Proxy myself, right?

You can specify when you start rocket-broker that you want to start proxy, so that instead of port 9876, the default port is 8081

xbhog commented 4 months ago

Has this issue been resolved? There is still a problem in 5.0.6 org.apache.rocketmq rocketmq-client-java 5.0.6

There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy

Understand, if I want to use this version of the client, I need to manually build the Proxy myself, right?

You can specify when you start rocket-broker that you want to start proxy, so that instead of port 9876, the default port is 8081

Got it, thanks for your reply, I'll try it

http-liu commented 1 month ago

同样的问题,但是proxy没接收到消息

isMrZhang commented 1 month ago

有人知道这是啥原因导致的吗 2024-07-17 14:40:16.128 ERROR [12116] [RocketmqClientAsyncWorker-1-15] [o.a.r.c.j.i.ClientImpl#?:?] - Failed to fetch topic route, clientId=DESKTOP-3QAXXX@12116@1@dqvj26vpdo, topic=phone-cabinet-dev org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNIMPLEMENTED: HTTP status code 404 invalid content-type: null trailers: Metadata(:status=404,date=Wed, 17 Jul 2024 06:40:15 GMT,server=Cowboy,content-length=0) at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539) at org.apache.rocketmq.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544) at org.apache.rocketmq.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) at org.apache.rocketmq.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at org.apache.rocketmq.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2024-07-17 14:40:16.128 ERROR [12116] [PushConsumerImpl-1 STARTING] [o.a.r.c.j.i.c.PushConsumerImpl#?:?] - Exception raised while starting the rocketmq push consumer, clientId=DESKTOP-3QAXXX@12116@1@dqvj26vpdo java.util.concurrent.ExecutionException: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNIMPLEMENTED: HTTP status code 404 invalid content-type: null trailers: Metadata(:status=404,date=Wed, 17 Jul 2024 06:40:15 GMT,server=Cowboy,content-length=0) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91) at org.apache.rocketmq.client.java.impl.ClientImpl.startUp(ClientImpl.java:188) at org.apache.rocketmq.client.java.impl.consumer.PushConsumerImpl.startUp(PushConsumerImpl.java:162) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:103) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNIMPLEMENTED: HTTP status code 404 invalid content-type: null trailers: Metadata(:status=404,date=Wed, 17 Jul 2024 06:40:15 GMT,server=Cowboy,content-length=0) at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539) at org.apache.rocketmq.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544) at org.apache.rocketmq.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) at org.apache.rocketmq.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at org.apache.rocketmq.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ... 1 common frames omitted

dypcoder commented 3 weeks ago

I encountered a situation where, after installing using Docker, due to port conflicts, I did port mapping.

The original command was:

docker run -d \
--name rmqbroker \
--network rocketmq \
--privileged=true \
-p 10912:10912 -p 10911:10911 -p 10909:10909 \
-p 8090:8080 -p 8091:8081 \
-e "NAMESRV_ADDR=rmqnamesrv:9876" \
-v /opt/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.0/conf/broker.conf \
apache/rocketmq:5.3.0 sh mqbroker --enable-proxy \
-c /home/rocketmq/rocketmq-5.3.0/conf/broker.conf

While debugging, I discovered that it was consistently retrieving port 8081. image I created the rmq-proxy.json file on the host machine and mounted it to the container.

The configuration content is as follows:

{
  "rocketMQClusterName": "DefaultCluster",
  "grpcServerPort": 8091,
  "remotingListenPort": 8090
}

I then modified the Docker command to:

docker run -d --restart=always \
--name rmqbroker \
--network rocketmq \
--privileged=true \
-p 10912:10912 -p 10911:10911 -p 10909:10909 \
-p 8090:8090 -p 8091:8091 \
-e "NAMESRV_ADDR=rmqnamesrv:9876" \
-v /opt/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.0/conf/broker.conf \
-v /opt/rocketmq/broker/conf/rmq-proxy.json:/home/rocketmq/rocketmq-5.3.0/conf/rmq-proxy.json \
apache/rocketmq:5.3.0 sh mqbroker --enable-proxy \
-c /home/rocketmq/rocketmq-5.3.0/conf/broker.conf

After restarting the broker container, it ran normally.

image

isMrZhang commented 3 weeks ago

You are truly a genius. I was troubled by the client-side 404 error while everything was fine on the server side, until I followed your method to switch the port. The client started working normally, and the reason turned out to be laughably that it conflicted with the local port 8081...