Hi,
This is my first experience with deployment grpc. I have this problem when
I run my client on different machine of the server:
Exception in thread "main" io.grpc.StatusRuntimeException: UNAVAILABLE: io
exception
at
io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)
at
grpcProtos.ServiceGrpc$ServiceBlockingStub.login(ServiceGrpc.java:316)
at clientGrpc.ClientGrpc.main(ClientGrpc.java:32)
Caused by:
io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException:
Connection refused: no further information: /127.0.0.1:[port]
Caused by: java.net.ConnectException: Connection refused: no further
information
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
at
java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
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:710)
at
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
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.base/java.lang.Thread.run(Thread.java:833)
My code of client is :
ManagedChannel channel = ManagedChannelBuilder.forAddress
("localhost",port).usePlaintext().build();
// stubs - generate from proto
ServiceGrpc.ServiceBlockingStub stub = ServiceGrpc.newBlockingStub(channel);
VoloOK.MessageLogin ml = VoloOK.MessageLogin.newBuilder
().setUsername("...").setPassword("...").build();
VoloOK.MessageResponse mr = stub.login(ml);
Can I help me, where is the problem?
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/89a1987a-96a0-47f3-8695-ee5bfbb16f73n%40googlegroups.com.