-
Notifications
You must be signed in to change notification settings - Fork 156
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
CRITICAL: Hitch crashed production server because of one faulty certificate pem file #369
Comments
We have had this issue from time to time. A partially-created or missing pem file will cause hitch to crash upon restart. Usually this is followed by a scramble to identify the offending line from the We have other servers where SSL is terminated with nginx. An The equivalent I wrote a small script to at least check and see that the file mentioned in the pem lines exists. James D. Keeline #!/bin/bash hitch -t || ERR=1 for PEM in $(grep ^pem $HITCH | awk -F'"' '{print $2}') if [ $ERR -gt 0 ]; then |
Thanks for the script, but we really need the hitch developers to "Just ignore the faulty pem file but keep on running with the correct ones." |
Apologies for taking my time in getting back to you here. I'm sorry to say I'm struggling to reproduce this - even when trying 1.6.1. Adding bogus files to a Any way you could come up with a reproducer? |
Hi Dag, thanks for looking into this. We have
Our PEMs are typically in the following format:
Try to leave one or more of the sections C1-C3 or P1 or D1-2 out and see what happens. I don't exactly remember the bogus PEM in great detail, however, next time, will take a note of it when it happens again. Maybe try with leaving P1 out. Thanks so kindly, |
Normally, I will run
to check all certs before reload/restart |
Expected Behavior
Expected Hitch to just ignore the faulty pem certificate and run happily.
Current Behavior
Mar 17 12:46:36 web2 hitch[2813]: 20220317T124636.810693 [ 2813] {core} hitch 1.6.1 starting
Mar 17 12:46:36 web2 hitch[2813]: 20220317T124636.812323 [ 2813] {core} Loading certificate pem files (11)
Mar 17 12:46:36 web2 systemd[1]: hitch.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit hitch.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Mar 17 12:46:36 web2 systemd[1]: hitch.service: Failed with result 'exit-code'.
Possible Solution
Just ignore the faulty pem file but keep on running with the correct ones.
Steps to Reproduce (for bugs)
put bogus pem file in directory where they are read from:
settings in conf file:
pem-dir = "/lego/certificates"
pem-dir-glob = "*.pem"
Context
Very nasty; all production websites down for a while.
Your Environment
Debain; everything fairly up to date.
hitch 1.6.1 (installed with: sudo apt install hitch )
If this was fixed after version 1.6.1, we sincerely apologise for this bug report, and, as such, hope Debian will have its packages more up-to-date
Thanks for making such a great piece of software,
Dennis Gaastra
The text was updated successfully, but these errors were encountered: