Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upKubernetes discovery failing with "Watch pods unexpectedly closed: EOF" #1719
Comments
This comment has been minimized.
This comment has been minimized.
|
How are you connecting to the API server? Is Prometheus running inside the cluster? Please paste the relevant bits of the Prometheus configuration you are using. Another thing to try – if you scale a few pods around after Prometheus has started, do they start showing up? in that case this would be #1702 |
This comment has been minimized.
This comment has been minimized.
|
I forgot to mention that it did manage to discover one pod, but not others. The relevant part of the config: (mostly copied from https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml)
|
This comment has been minimized.
This comment has been minimized.
|
OK, I figured out the problem. Prometheus requires containers to declare their ports. In the absence of the port relabeling, it will scrape the lowest port. The error message in the log is just red herring. |
guoshimin
closed this
Jun 9, 2016
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
guoshimin commentedJun 8, 2016
What did you do?
Using kubernetes discovery to discover services, nodes and pods.
What did you expect to see?
New pods discovered by prometheus
What did you see instead? Under which circumstances?
New pods not picked up by prometheus. Saw repeated messages like the following in the log:
Environment
Prometheus version:
0.19.2
Alertmanager version:
insert output of
alertmanager -versionhere (if relevant to the issue)Prometheus configuration file: