Skip to content

Prometheus server running linkerd does not scrape all endpoints with EOF error #2067

Description

@gamer22026

Bug Report

What is the issue?

When running linkerd on a prometheus server, not all endpoints are being scraped

How can it be reproduced?

Unsure

Logs, error output, etc

2019-01-11T16:57:00.029203704Z DBUG proxy={server=out listen=127.0.0.1:4140 remote=100.96.66.194:49276} linkerd2_proxy::app::main outbound addr=Some(Socket(V4(10.101.224.11:61623)))
2019-01-11T16:57:00.029240734Z DBUG 10.101.224.11:61623 linkerd2_proxy::app::main outbound dst=Some(DstAddr { addr: Socket(V4(10.101.224.11:61623)), direction: Out })
2019-01-11T16:57:00.029250383Z DBUG 10.101.224.11:61623 linkerd2_proxy::proxy::http::client client request: method=GET uri=http://10.101.224.11:61623/metrics version=HTTP/1.1 headers={"host": "10.101.224.11:61623", "user-agent": "Prometheus/2.4.0", "accept": "text/plain;version=0.0.4;q=1,*/*;q=0.1", "accept-encoding": "gzip", "x-prometheus-scrape-timeout-seconds": "10.000000", "l5d-dst-canonical": "10.101.224.11:61623"}
2019-01-11T16:57:00.252847818Z WARN proxy={server=out listen=127.0.0.1:4140 remote=100.96.66.194:49276} hyper::proto::h1::role transfer-encoding and content-length both found, canceling

2019-01-11T16:57:01.642302959Z DBUG proxy={server=out listen=127.0.0.1:4140 remote=100.96.66.194:37732} linkerd2_proxy::app::main outbound addr=Some(Socket(V4(10.101.224.11:9100)))
2019-01-11T16:57:01.642335682Z DBUG 10.101.224.11:9100 linkerd2_proxy::app::main outbound dst=Some(DstAddr { addr: Socket(V4(10.101.224.11:9100)), direction: Out })
2019-01-11T16:57:01.6423418Z DBUG 10.101.224.11:9100 linkerd2_proxy::proxy::http::client client request: method=GET uri=http://10.101.224.11:9100/metrics version=HTTP/1.1 headers={"host": "10.101.224.11:9100", "user-agent": "Prometheus/2.4.0", "accept": "text/plain;version=0.0.4;q=1,*/*;q=0.1", "accept-encoding": "gzip", "x-prometheus-scrape-timeout-seconds": "10.000000", "l5d-dst-canonical": "10.101.224.11:9100"}

linkerd check output

kubernetes-api: can initialize the client..................................[ok]
kubernetes-api: can query the Kubernetes API...............................[ok]
kubernetes-api: is running the minimum Kubernetes API version..............[ok]
linkerd-existence: control plane namespace exists..........................[ok]
linkerd-existence: controller pod is running...............................[ok]
linkerd-existence: can initialize the client...............................[ok]
linkerd-existence: can query the control plane API.........................[ok]
linkerd-api: control plane pods are ready..................................[ok]
linkerd-api: can query the control plane API...............................[ok]
linkerd-api[kubernetes]: control plane can talk to Kubernetes..............[ok]
linkerd-api[prometheus]: control plane can talk to Prometheus..............[ok]
linkerd-api: no invalid service profiles...................................[ok]
linkerd-version: can determine the latest version..........................[ok]
linkerd-version: cli is up-to-date.........................................[ok]
linkerd-version: control plane is up-to-date...............................[ok]

Status check results are [ok]

Environment

  • Kubernetes Version: 1.10.11
  • Prometheus Version: 2.4.0
  • Cluster Environment: kops
  • Host OS: Debian GNU/Linux 8
  • Linkerd version: edge-19.1.1

Possible solution

Additional context

The endpoints I am scraping are not running linkerd.
While I am seeing this issue on many endpoints in my existing prometheus server, I took one specific use case to test with. I have a cassandra server that has 2 scrapable endpoints 9100 (node_exporter) and 61623(cassandra metrics).

screenshot_2019-01-11_09-46-35

As you can see, one works, one does not. If I remove the linkerd proxy from the prometheus-server, then all endpoints work as they should. From the logs, the only difference is the role transfer-encoding and content-length both found, canceling warning that shows up on the scrape to 61623.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions