question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JAVA Client-Server grpc with SSL . Unable to communicate client server

See original GitHub issue

Please answer these questions before submitting your issue.

What version of gRPC are you using?

<grpc.version>1.14.0</grpc.version>

What did you expect to

I am expecting to run Client-Server grpc with SSL.

Hi, I have created a maven project and make poc Client-Server-grpc by using this reference https://github.com/grpc/grpc-java/tree/master/examples And its working properly. But when I try to use TLS, getting following response:

**Run HelloWorldServerTls:** 

grpc.server.tls.HelloWorldServerTls start
INFO: Server started, listening on 50051

**Run HelloWorldClientTls:**

grpc.client.tls.HelloWorldClientTls greet
INFO:  Will try to greet localhost ...
Sep 12, 2018 4:50:59 AM grpc.client.tls.HelloWorldClientTls greet
WARNING: *****RPC failed: Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further informat
ion: localhost/0:0:0:0:0:0:0:1:50051
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:325)
        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:634)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection refused: no further information
        ... 11 more
}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Kindly suggest.

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dapengzhang0commented, Sep 20, 2018

To clarify:

  • The example in examples/src/main/java/io/grpc/examples/helloworldtls is using TLS.
  • The example in examples/src/main/java/io/grpc/examples/alts is using ALTS, which is not TLS at all, and could only be used in GCP VM environments.
1reaction
lisongmincommented, Sep 12, 2018

Same problem.

  • v1.13.2 work well
  • v1.14.0, v1.15.0 not work
Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Not able to connect to grpc server from client through SSL
I am able to bring the grpc server up successfully. The documentation here mentions that the client code for a secure channel is...
Read more >
Build client-server applications with gRPC - Android Developers
gRPC is a modern, open-source, high-performance RPC framework that can run in any environment. It can efficiently connect services in and ...
Read more >
Is gRPC the Future of Client-Server Communication? - Medium
A logical place to start when answering this question is to first talk about what the letters in gRPC mean. It is an...
Read more >
Giskard is coming to your notebook: a gRPC tunnel to reverse ...
With Giskard's new External ML Worker feature, we introduce a gRPC tunnel to reverse the client-server communication so that data scientists ...
Read more >
gRPC - A Modern Framework for Microservices Communication
The REST architectural style constrains an architecture to a client/server architecture and uses a stateless communication protocol, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found