Rpc error: code = 13 desc = transport is closing

If you get an error like the following:

rpc error: code = 13 desc = transport is closing

it’s possible you’re running a secure cluster and need to pass in the user’s certificate flags to perform the action, e.g.

cockroach sql --ca-cert=certs/ca.cert --cert=certs/root.cert --key=certs/root.key

Also, on newer binaries (20161027 onward), there should be an additional message attempting to clarify the problem:

“Please check the address and credentials such as certificates (if attempting to
communicate with a secure cluster).”

If there isn’t, then you may want to ping https://github.com/cockroachdb/cockroach/pull/9917 with the case where it isn’t being displayed.