xds: Improve error message for XdsServer listener not found
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.