Closed perrygeo closed 2 years ago
This error msg is emit for dead network connection by the driver.
// ErrBadConn should be returned by a driver to signal to the sql
// package that a driver.Conn is in a bad state (such as the server
// having earlier closed the connection) and the sql package should
// retry on a new connection.
// ErrBadConn should only be returned from Validator, SessionResetter, or
// a query method if the connection is already in an invalid (e.g. closed) state.
try launching exporter inside kubernetes. If it works, then maybe something is wrong with the proxy.
A tcp traffic dump would be very helpful for this.
There's another possibility: Timeout
The start-up - fetch version process has a hard-coded 100ms timeout.
If your RT between postgres & exporter is more than 100ms, which may leads to timeout.
This parameter will becomes to a config entry in next release.
Thanks for the great work on this! I'm running
pg_exporter
and I'm hitting an error on the precheck steps.This appears to be where the query in question is made,
SHOW server_version_num;
When I connect directly using psql at the same URI, I'm able to run it without issue.
I'm not sure how/if it matters but I'm accessing this db over a TCP proxy using
kubectl proxy
. It doesn't seem to impact any other postgres clients but worth mentioning.What am I missing?