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

Graceful stopping fails with prometheus enabled #173

Open
clushie opened this issue Oct 8, 2024 · 0 comments · May be fixed by #178
Open

Graceful stopping fails with prometheus enabled #173

clushie opened this issue Oct 8, 2024 · 0 comments · May be fixed by #178

Comments

@clushie
Copy link

clushie commented Oct 8, 2024

If I'm running supercronic with prometheus active, sending SIGINT or SIGTERM results in an exit code of 1 and the log message "prometheus http serve failed".

supercronic -json -prometheus-listen-address 0.0.0.0 /config/cronfile &
sleep 1s
kill -SIGINT %1
# {"level":"info","msg":"received interrupt, shutting down","time":"2024-10-08T08:17:55Z"}
# {"level":"info","msg":"waiting for jobs to finish","time":"2024-10-08T08:17:55Z"}
# {"level":"info","msg":"exiting","time":"2024-10-08T08:17:55Z"}
# {"level":"fatal","msg":"prometheus http serve failed: http: Server closed","time":"2024-10-08T08:17:55Z"}
# [1]+  Exit 1                  supercronic -json -prometheus-listen-address 0.0.0.0 -json /config/cronfile

without prometheus, the stopping becomes graceful again:

supercronic -json /config/cronfile &
sleep 1s
kill -SIGINT %1
# {"level":"info","msg":"read crontab: /config/cronfile","time":"2024-10-08T08:20:28Z"}
# {"level":"info","msg":"received interrupt, shutting down","time":"2024-10-08T08:20:29Z"}
# {"level":"info","msg":"waiting for jobs to finish","time":"2024-10-08T08:20:29Z"}
# {"level":"info","msg":"exiting","time":"2024-10-08T08:20:29Z"}
# [1]+  Done                    supercronic -json /config/cronfile

Note, without prometheus the /health endpoint is also missing

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

Successfully merging a pull request may close this issue.

1 participant