kubernetes-sigs / metrics-server

Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
https://kubernetes.io/docs/tasks/debug-application-cluster/resource-metrics-pipeline/
Apache License 2.0
5.77k stars 1.86k forks source link

http2: server: error reading preface from client, read: connection reset by peer #1217

Closed khteh closed 1 month ago

khteh commented 1 year ago

What happened:

[metrics-server-856457dd94-bq4x7] http2: server: error reading preface from client <IP>:35766: read tcp <IP>:4443-><IP>:35766: read: connection reset by peer

What you expected to happen: No error.

Anything else we need to know?:

Environment:

spoiler for Metrics Server manifest:
spoiler for Kubelet config:
spoiler for Metrics Server logs:

/kind bug

logicalhan commented 1 year ago

/triage accepted /assign @dgrisonnet

dgrisonnet commented 1 year ago

This seems like a problem from your client resetting the connection before metrics-server is able to read any data that the client is supposed to be sending.

This should be pretty harmless but it could be worth checking if there is any misconfiguration on your client if that error happens frequently.

k8s-triage-robot commented 6 months ago

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

sondrelg commented 2 months ago

Would it be possible to log this using the "regular" log formatting?

Here's a sample of our metrics-server pod stdout output:

E0722 10:29:00.913915       1 scraper.go:140] "Failed to scrape node" err="Get \"https://redacted:10250/metrics/resource\": context deadline exceeded" node="ip-redacted.eu-north-1.compute.internal"
E0722 10:29:15.908388       1 scraper.go:140] "Failed to scrape node" err="Get \"https://redacted:10250/metrics/resource\": context deadline exceeded" node="ip-redacted.eu-north-1.compute.internal"
http2: server: error reading preface from client redacted:56766: read tcp redacted:4443->redacted:56766: read: connection reset by peer
http2: server: error reading preface from client redacted:56766: read tcp redacted:4443->redacted:56766: read: connection reset by peer

We're parsing the first two lines using a log scraper, and the second two break our parsing logic.

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 1 month ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/metrics-server/issues/1217#issuecomment-2304481769): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.