doc: add faq for logging and "transport is closing" error (#2372)
This commit is contained in:
22
README.md
22
README.md
@ -43,3 +43,25 @@ Please update proto package, gRPC package and rebuild the proto files:
|
|||||||
- `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`
|
- `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`
|
||||||
- `go get -u google.golang.org/grpc`
|
- `go get -u google.golang.org/grpc`
|
||||||
- `protoc --go_out=plugins=grpc:. *.proto`
|
- `protoc --go_out=plugins=grpc:. *.proto`
|
||||||
|
|
||||||
|
#### How to turn on logging
|
||||||
|
|
||||||
|
The default logger is controlled by the environment variables. Turn everything
|
||||||
|
on by setting:
|
||||||
|
|
||||||
|
```
|
||||||
|
GRPC_GO_LOG_VERBOSITY_LEVEL=99 GRPC_GO_LOG_SEVERITY_LEVEL=info
|
||||||
|
```
|
||||||
|
|
||||||
|
#### The RPC failed with error `"code = Unavailable desc = transport is closing"`
|
||||||
|
|
||||||
|
This error means the connection the RPC is using was closed, and there are many
|
||||||
|
possible reasons, including:
|
||||||
|
1. mis-configured transport credentials, connection failed on handshaking
|
||||||
|
1. bytes disrupted, possibly by a proxy in between
|
||||||
|
1. server shutdown
|
||||||
|
|
||||||
|
It can be tricky to debug this because the error happens on the client side but
|
||||||
|
the root cause of the connection being closed is on the server side. Turn on
|
||||||
|
logging on __both client and server__, and see if there are any transport
|
||||||
|
errors.
|
||||||
|
Reference in New Issue
Block a user