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

Failed to set ocsp stapling #168

Open
EtreRe opened this issue Feb 15, 2019 · 10 comments
Open

Failed to set ocsp stapling #168

EtreRe opened this issue Feb 15, 2019 · 10 comments

Comments

@EtreRe
Copy link

EtreRe commented Feb 15, 2019

Hello

We have domain with expired certificat that are not renew with this error in the log

2019/02/15 12:07:32 [error] 18188#18188: *29843 [lua] ssl_certificate.lua:255: set_response_cert(): auto-ssl: failed to set ocsp stapling for insecticide-spray.com - continuing anyway - failed to get ocsp response: failed to validate OCSP response (http://ocsp.int-x3.letsencrypt.org): OCSP_check_validity() failed, context: ssl_certificate_by_lua*, client: 92.184.96.115, server: 0.0.0.0:443

The only solution to force the renew is to delete the directory of this domain in the certs directory and to restart openresty.

Do you have a solution ?

Thank you

@fjros
Copy link

fjros commented Feb 15, 2019

One of our customers had this same problem two days ago. After restarting openresty the issue went away.

@EtreRe
Copy link
Author

EtreRe commented Feb 15, 2019

Unfortunately a simple restart doesn't change anything for us

@jdppettit
Copy link

@EtreRe did you end up finding a solution here? I believe we are experiencing a similar problem.

@velocity-360
Copy link

We are also experiencing the same issue.

@guiwestrup
Copy link

I have same problem on my server, restarting is resolving, but it's happening even when I'm not awake.
haha :/

@alisei
Copy link

alisei commented Nov 20, 2019

Did anybody found a solution for this ? I have the same problem and after restarting openresty the issue is still there.

@phil118
Copy link

phil118 commented Nov 21, 2019

Anyone had any luck with this as we have the same issue?

Been told by the Lets Encrypt community that

"The OCSP check doesn’t work if there are expired certificatets (this is new).
So to fix change your client usage to skip that OCSP-check"

How would we go about this skipping of OCSP-check?

@fititnt
Copy link

fititnt commented May 2, 2020

One post that mentions what @phil118 said is this one https://community.letsencrypt.org/t/failed-to-get-ocsp-stapling-no-certificate/106917

@fititnt
Copy link

fititnt commented May 2, 2020

TL;DR:

Steps to workaround on this issue

  1. For all certificates that expired and still on your storage, delete then.
  2. Force openresty re-read that there is not certificate to use. One way to do this is restart the openresty.
  3. Test if is working.

Here what worked for me:

In the very specific case that certificates got expired and they still on the memory, this error may occur. On my case, I was using clusterized option the drafted storage adapter New Consul storage adapter for lua-resty-auto-ssl #203 but I suspect that this may happen to other drivers.

I can confirm that this only happened to certificates that expired. Just found this bug by accident after fixing blacklisted sub domains. So is very likely that just an small portion of the users may be affected by this.

What could be done to let lua-resty-auto-ssl automatically work around this

Since this seems to be an default behavior, the lua-resty-auto-ssl ideally should check if an certificate already expired and, if yes, ignore it.

Alternative: document the issue

One quicker alternative is document this specific bug.

If the potential fix could in worst case scenario delete valid certificates, the very specific case when this happens may not worth to fix and require human intervention. One case could be make the error message more clear, like "did this certificate expired?"

@jordanade
Copy link

Would love to see some kind of automatic handling of this situation.

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

9 participants