Matty9191 / ssl-cert-check

Send notifications when SSL certificates are about to expire.
GNU General Public License v2.0
736 stars 289 forks source link

ERROR: The file named /var/tmp/cert.7EUgVE is unreadable or doesn't exist #105

Open modernmagic opened 3 years ago

modernmagic commented 3 years ago

MY CRON: u16-uwgkceqglfgn@c71749.sgvps.net:~/www/modernmagic.com/public_html/cgi-bin$ /home/u16-uwgkceqglfgn/www/modernmagic.com/public_html/cgi-bin/ssl-cert-check -a -f ssldomains -q -x 60 -e webwizard@modernmagic.com

EXECUTED SCRIPT ERROR: The file named /var/tmp/cert.7EUgVE is unreadable or doesn't exist ERROR: Please check to make sure the certificate for avpack702.com 443:avpack702.com 443 is valid

Can you help troubleshoot this?

rodgomes commented 3 years ago

I had a similar issue and the problem was the file format, which is not mentioned in this repo but in these docs https://prefetch.net/articles/checkcertificate.html Basically, you need to have a SERVER PORT per line (notice the space after server).

modernmagic commented 3 years ago

Thanks. Where exactly is there a missing space?

My ssldomains file looks like this: avpack702.com 443 modernmagic.com 443

rodgomes commented 3 years ago

ah, it does look correct and it works for me if I run: ssl-cert-check -f ssldomains

Result: ` Host Status Expires Days


avpack702.com:443 Valid Jun 19, 2021 31 modernmagic.com:443 Valid Jun 19, 2021 31 `

ryantm commented 3 years ago

This error message means there was some problem with the openssl but it wasn't caught by the error checking logic.

When I got this problem it turned out that openssl was timing out. I've fixed that one with this PR: https://github.com/Matty9191/ssl-cert-check/pull/114

A more general fix to this problem would be to output the openssl error message in the event of an error here. Like I did in this commit:

https://github.com/ryantm/ssl-cert-check/commit/589e418a3374a95fa0890ff221dea094d99ac274

gilbertosoareslopes commented 2 years ago

Hello, I am also getting the same problem, how to resolve this?

leahneukirchen commented 2 years ago

https://github.com/Matty9191/ssl-cert-check/pull/114 has a fix.