I changed my code ManagedChannelBuilder.forAddress("localhost", port).usePlaintext().build(); to ManagedChannelBuilder.forAddress("localhost", port).forAddress("127.0.0.1", port).usePlaintext().build(); , this seems to succeed, no errors occurred, very strange 在2021年6月15日星期二 UTC+8 上午11:34:46<李灵韬> 写道:
> Caused by: > io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: > > Connection refused: no further information: /127.0.0.1:50051 > Caused by: java.net.ConnectException: Connection refused: no further > information > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) > at > io.grpc.netty.shaded.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330) > at > io.grpc.netty.shaded.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) > at > io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702) > at > io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) > at > io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) > at > io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) > at > io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) > at > io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) > at > io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) > at java.lang.Thread.run(Unknown Source) > > 在2021年6月15日星期二 UTC+8 上午10:49:23<李灵韬> 写道: > >> Do I need to provide more information? >> >> 在2021年6月15日星期二 UTC+8 上午10:45:28<李灵韬> 写道: >> >>> I recently added grpc to my app, but it occasionally reports errors, >>> which cannot be reproduced stably. >>> Console output: >>> java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: >>> UNAVAILABLE: io exception >>> at >>> com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:566) >>> at >>> com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547) >>> >>> My client uses Java, the server uses Python, and the grpc version is >>> 1.36.0 >>> >> -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/bb149700-1af6-46fd-a5cc-37294b478e5bn%40googlegroups.com.