xds: Improve error message for XdsServer listener not found
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
Running on master and using TD, if I get the endpoint-selector wrong (or it doesn't exist), I get:
> Nov 02, 2021 12:30:50 AM io.grpc.xds.XdsServerBuilder$DefaultListener onNotServing
> WARNING: [port:50051] NOT_FOUND: Requested entity was not found.
That's not helpful in the least. From a grpc-developer standpoint I can make sense of that after some assumptions, but for a user it is pretty useless except for Googling and hoping there's something on SO.
I do think this is a difficult message though, because the client doesn't actually know what's going on. Maybe there is a port mismatch. Maybe there is a metadata mismatch. Maybe they didn't include metadata in the bootstrap. Maybe the endpoint policy was matching SIDECAR_PROXY instead of GRPC_SERVER. Or maybe it just hasn't propagated through the control plane yet. So there's little hope of including _everything_ the user needs to look at to resolve this.
So I think the best thing to do is just include the context of the error. "Failed to find listening configuration for address '0.0.0.0:50051': Requested entity was not found." Or similarly "Failed to find listening configuration 'grpc/server?xds.resource.listening_address=0.0.0.0:50051': Requested entity was not found." (of which I'm preferring the latter) We might also suggest "check your bootstrap" but... dunno.
CC @sanjaypujare @YifeiZhuang
Contributor guide
Assessment
This issue has not been assessed yet.