Using DNS Service Discovery returns UNAVAILABLE: NameResolver returned an empty list
See original GitHub issueWhat version of gRPC are you using?
- 1.15.1
What did you expect to see?
-
One of the scenarios is as follows:
- Using envoyproxy as Load balancer.
- Using AWS Service Discovery as DNS Service Discovery
- DNS Service Discovery server that serves as an A record pointing to that load balancer
- One “backend”, which the load balancer points to
- Such a flow
- gRPC client server→ envoy proxy → AWS Service Discovery → gRPC api server
-
The gRPC client server will return
UNAVAILABLE: NameResolver returned an empty list
when the ip of envoy is changed. -
It seems that gRPC client server has done DNS cache and it is not updated to new ip.
stacktrace
io.grpc.StatusRuntimeException: UNAVAILABLE: NameResolver returned an empty list
at io.grpc.Status.asRuntimeException(Status.java:526)
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:482)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:678)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:403)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:584)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
[grpc-java] using NameResolver for grpc servers with TLS
I am now trying to implement service discovery using Spring ... The error is caused by my NameResolver implementation returning the service id...
Read more >io.grpc.NameResolver$Listener java code examples - Tabnine
Receives address updates. All methods are expected to return quickly. Most used methods. onAddresses. Handles updates on resolved addresses and attributes.
Read more >gRPC failed to connect to all addresses or DNS resolution ...
I am using a C# Asp.NET Core WebApi as the server and I try to connect to it via a Python client. Ressources....
Read more >Using Avahi in Guile Scheme Programs
This daemon actually implements the DNS-SD protocol and handles service discovery ... Return a new host-name resolver using the specified client , interface ......
Read more >NameResolver.Listener (grpc-all 1.51.0 API)
All Known Implementing Classes: NameResolver.Listener2 ... All methods are expected to return quickly. ... An empty list will trigger onError(io.grpc.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yutachaos Note that if you use it on Android platform, you have to add permission for INTERNET connection in your AndroidManifest.xml. Just before “<Application” line add :
<uses-permission android:name="android.permission.INTERNET" />
and build again.The reported error at this point is pretty good (as in, the best we can provide). It seems the problem is just connectivity issues between the client and host. Closing.