Description
The binary is generating many warnings about attempting to write headers after the body of a request has been written when serving metrics to Prometheus' scrapers.
http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:59)
http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:59)
http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:59)
Steps to reproduce the issue:
Download latest (as of this writing, 1.1.4) linux-amd64 binary
Run it
Watch the logs
Describe the results you received:
Service logs (I'm running it as a daemon through SystemD) are full of warnings.
Describe the results you expected:
No warnings about headers being written after the body.
Description The binary is generating many warnings about attempting to write headers after the body of a request has been written when serving metrics to Prometheus' scrapers.
Steps to reproduce the issue:
Describe the results you received: Service logs (I'm running it as a daemon through SystemD) are full of warnings.
Describe the results you expected: No warnings about headers being written after the body.
Additional information: This issue has been fixed upstream back in early 2020 at https://github.com/prometheus/client_golang/commit/586178b4ab42bbe57811049a16f1aae5d164feb8, subsequently released in https://github.com/prometheus/client_golang/releases/tag/v1.5.1
I believe the version you currently have pinned in go.mod is too old.
Output of
node-cert-exporter --version
:Additional environment details: Ubuntu Focal, amd64 arch, AWS instance.