wyd114398 opened a new issue, #9478:
URL: https://github.com/apache/rocketmq/issues/9478

   ### Before Creating the Bug Report
   
   - [x] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [x] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [x] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   Run rocketmq 5.3.2 on docker desktop on the window environment
   
   ### RocketMQ version
   
   server:  rocketmq 5.3.2
   client: rocketmq-java-client: 5.0.8
   
   ### JDK Version
   
   openjdk:jdk-17.0.12
   
   ### Describe the Bug
   
   I deployed rocketmq5.3.2 in local mode on docker, and at the same time 
deployed rocketmq-dashboard, and sent and created topics on the dashboard, and 
the messages sent were normal. However, an error is reported when writing a 
program link server in idea
   My program code is as follows:
   `@Test
       public void testProvider() throws ClientException {
   
           //创建一个providerBuilder
           ClientServiceProvider clientServiceProvider = 
ClientServiceProvider.loadService();
           ProducerBuilder producerBuilder = 
clientServiceProvider.newProducerBuilder();
   
           SessionCredentialsProvider credentialsProvider = new 
StaticSessionCredentialsProvider("","");
           ClientConfiguration clientConfiguration = ClientConfiguration
                   .newBuilder()
                   .setEndpoints("localhost:9876")
   //                .setCredentialProvider(credentialsProvider)
                   .setRequestTimeout(Duration.ofSeconds(30))
                   .enableSsl(false)
                   .build();
           Producer producer = producerBuilder
                   .setTopics("normal-topic", "fifo-topic", "delay-topic", 
"transaction-topic")
                   .setClientConfiguration(clientConfiguration)
                   //.setTransactionChecker() //事务检查
                   .setMaxAttempts(2)
                   .build();
       }`
   
   
   
   ### Steps to Reproduce
   
   run the method : testProvider(),
   
   
   
   ### What Did You Expect to See?
   
   The program ended and exited normally
   
   ### What Did You See Instead?
   
   The program error log is as follows:
   
   11:32:01.091 [grpc-nio-worker-ELG-1-2] DEBUG 
org.apache.rocketmq.shaded.grpc.netty.NettyClientHandler - [id: 0xe80dc01c, 
L:/172.28.144.1:62751 - R:/172.28.144.1:9876] OUTBOUND SETTINGS: ack=false 
settings={=0, =0, =1048576, =8192}
   11:32:01.116 [grpc-nio-worker-ELG-1-2] DEBUG 
org.apache.rocketmq.shaded.grpc.netty.NettyClientHandler - [id: 0xe80dc01c, 
L:/172.28.144.1:62751 - R:/172.28.144.1:9876] OUTBOUND WINDOW_UPDATE: 
streamId=0 windowSizeIncrement=983041
   
   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:384)
        at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:308)
        at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService.awaitRunning(AbstractIdleService.java:160)
        at 
org.apache.rocketmq.client.java.impl.producer.ProducerBuilderImpl.build(ProducerBuilderImpl.java:93)
        at com.wyd.stuy.rocketmq5.test.MqTest.testProvider(MqTest.java:40)
        at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        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.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        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.junit.runners.ParentRunner.run(ParentRunner.java:363)
        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:235)
        at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
   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:592)
        at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:571)
        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:119)
        at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService.lambda$doStart$0(AbstractIdleService.java:64)
        at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:105)
        at java.base/java.lang.Thread.run(Thread.java:1583)
   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:1144)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        ... 1 more
   
   
   Process finished with exit code -1
   
   ### Additional Context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to