Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Get http://localhost:9661/metrics/main: EOF #5

Open
kevinekw opened this issue May 3, 2018 · 6 comments
Open

Error: Get http://localhost:9661/metrics/main: EOF #5

kevinekw opened this issue May 3, 2018 · 6 comments

Comments

@kevinekw
Copy link

kevinekw commented May 3, 2018

Hi ncabatoff,

Thank you for providing such an awesome exporter. I'm fairly new to Prometheus, so please bear with me :)

I have been using your script-exporter against a python executable file that runs some oracle sql query and output in the Prometheus text exposision format.

Out of the 3 queries, 2 of them are working fine (script duration is less than 5sec) and prometheus did not display any errors. The third one sometimes works fine, and sometimes gives me and EOF error as shown:
eof_error
eof_error2

This script duration runs between 5-60sec. This depends on how busy the database is, the script duration will vary.

To be honest, I dont think this is a script duration issue. Looking at the error, would you be able to tell me what could be the problem and how I could fix it?

Thank you in advance :)

Regards,
Kevin

@ncabatoff
Copy link
Owner

Not sure, but I fixed a serious bug (race condition) a few days ago, so you might want to try updating. Otherwise, are you seeing anything in the exporter's stdout/stderr? Are any of the script_exporter internal error metrics nonzero?

@zstoth
Copy link

zstoth commented Nov 12, 2018

I see the exact same issue randomly appearing for one of my targets. The script logs that it was invoked, but somehow Prometheus does not receive the response. Can't see anything in Prometheus' or the script exporter's logs. Using the 0.1.3 release.

@nikosmeds
Copy link

@zstoth I'm having similar issue. What happens when you curl the exporter directly?

$ time curl localhost:9661/metrics/servers.py
curl: (52) Empty reply from server

real	0m21.358s
user	0m0.008s
sys	0m0.000s

Seeing the same EOF error in Prometheus targets, and curl returns with the empty reply message shown above. Couple things of note.

  1. Running the script directly with ./servers.py is successful and takes ~30 seconds.
  2. Running the script via curl or as Prometheus returns the above mentioned errors, however the script is successfully running in both cases (confirmed with log files). Have scrape interval set to 60 seconds and timeout 50 seconds for the specific Prometheus job.

@nikosmeds
Copy link

nikosmeds commented Nov 15, 2018

Possibly related to #6 ?

EDIT: Yep. I recompiled the binary with change in #6 and it has resolved the issue.

@nikosmeds nikosmeds mentioned this issue Nov 15, 2018
@Go-Pomegranate
Copy link

Go-Pomegranate commented Mar 13, 2020

For me setting scrape_timeout to 5 min (before 1 min) solved a similar issue in another project.

@jialanli
Copy link

jialanli commented Aug 9, 2021

I also had a similar error, but it happened in the process of prometheus notifying alertmanager, please move: prometheus/prometheus#9176
Do you have a solution to the error, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants