kiam
kiam copied to clipboard
Improve TLS error reporting
We often get issues created that relate to gRPC TLS problems that aren't immediately obvious from the reported error.
For example, in #111:
{"level":"warning","msg":"error finding role for pod: rpc error: code = Unavailable desc = there is no address available","pod.ip":"172.22.6.16","time":"2018-07-04T17:11:03Z"}
Currently the only way to view these errors is by setting some gRPC environment variables:
GRPC_GO_LOG_SEVERITY_LEVEL=info
GRPC_GO_LOG_VERBOSITY_LEVEL=8
This increases the output verbosity making it easier to see the problem:
WARNING: 2017/12/21 14:53:59 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::1]:443: connect: cannot assign requested address"; Reconnecting to {[::1]:443 0 <nil>}
INFO: 2017/12/21 14:53:59 balancerWrapper: handle subconn state change: 0xc4202ea4e0, TRANSIENT_FAILURE
INFO: 2017/12/21 14:53:59 ccBalancerWrapper: updating state and picker called by balancer: CONNECTING, 0xc42023e2a0
WARNING: 2017/12/21 14:53:59 Failed to dial 127.0.0.1:443: connection error: desc = "transport: authentication handshake failed: x509: certificate is valid for localhost, kiam-server, not localhost:443"; please retry.
INFO: 2017/12/21 14:53:59 balancerWrapper: handle subconn state change: 0xc4202ea490, SHUTDOWN
INFO: 2017/12/21 14:53:59 ccBalancerWrapper: updating state and picker called by balancer: TRANSIENT_FAILURE, 0xc42023e2a0
WARN[0000] error checking health: rpc error: code = Unavailable desc = there is no connection available
It'd be nice if there was a way we could improve and report more specific errors from within the client without needing users to set environment variables.
@pingles did you get kiam to work for you? i have this issue #164 opened but not sure if everyone else got this to work as logging is close to useless because not useful logs