Open kpagcha opened 3 years ago
I'm having same issue (used through https://github.com/Valian/docker-nginx-auto-ssl/ ). This is also not the fist time this happened. REmoving the storage and restarting helps, but this doesn't feel like a reliable solution.
Yeah, deleting certs and restarting the server every time this happens isn't really a solution.
I found out the renewal isn't going throught because of this error:
2021/08/30 08:44:11 [error] 8962#8962: *1603936 lua entry thread aborted: runtime error: ...sty/luajit/share/lua/5.1/resty/auto-ssl/servers/hook.lua:43: assertion failed!
stack traceback:
coroutine 0:
[C]: in function 'assert'
...sty/luajit/share/lua/5.1/resty/auto-ssl/servers/hook.lua:43: in function 'server'
.../local/openresty/luajit/share/lua/5.1/resty/auto-ssl.lua:95: in function 'hook_server'
content_by_lua(scheduler.conf:112):2: in main chunk, client: 127.0.0.1, server: , request: "POST /deploy-cert HTTP/1.1", host: "127.0.0.1:8999"
It's an error in the very plugin. Has anybody had the same issue?
Hello, I am also experiencing this problem.
All of a sudden, my certificates don't renew anymore and in order for them to be renewed I have to manually remove the expired certificate.
Did you manage to solve it? @knopp @kpagcha
We're getting the error "failed to get ocsp response: failed to validate OCSP response (http://r3.o.lencr.org): OCSP response not successful (6: unauthorized)" for hundreds of domains we have.
At first, this error is being generated because all domains that are already expired have not been renewed and the SSL file is expired inside the default folder (/etc/resty-auto-ssl/storage/file).
Therefore, the OCSP error would only be a final error due to the lack of renewal.
Now, the problem is that the renovation worked perfectly for the last year. It just stopped working.
The only fact we are sure of so far is: only expired SSL files are not being removed from "/etc/resty-auto-ssl/storage/file".
NOTE: If we remove the expired SSL file from the folder and restart openresty, the SSL is generated perfectly (our problem is that there are hundreds a day).
We're getting the error "failed to get ocsp response: failed to validate OCSP response (http://r3.o.lencr.org): OCSP response not successful (6: unauthorized)" for hundreds of domains we have.
did you found a fix?
Hi @jbenguira
The solution to this problem was to define a time for the certificates to be renewed, we set it for every 6 hours, one important thing is to check if there is no cron with a problem.
auto_ssl:set("renew_check_interval", 21600)
Within the Dehydrate configuration, we changed the renewal setting which by default is 30 days to 7 days, ie 7 days before the certificate expires it should try to renew. This has been changed to mitigate renewal limit issues.
/usr/local/bin/resty-auto-ssl/dehydrated
RENEW_DAYS="7" # Before 30
It may be necessary to remove the certificate that is showing the OCSP error, for that you need to remove it from this path here, change [YOURDOMAIN] by the domain you want to remove:
/etc/resty-auto-ssl/storage/file/[YOURDOMAIN]%3Alatest
Thanks a lot @eduardo-santos-carvalho for the detailed answer :)
(See the actual error at the end of this post)
Everything was working fine. This is my
/usr/local/openresty/nginx/conf/nginx.conf
file:We have domains of our own as
*.mysite.org
and third party custom domains. Theallow_domain
function returns true straight away if the domain is ours and if it is not, it checks with our backend to determine whether it's allowed and a cert should be issued.Then, our server configuration at
/usr/local/openresty/nginx/sites/enabled/mysite.conf/
:The issue: certs weren't getting renewed for two domains. One of our own (
www.mysite.org
) and a custom one (www.someone.org
). They were expired and just wouldn't get renewed. Restarting the server didn't help.In the end, I had to delete the cert files
/etc/resty-auto-ssl/storage/file/www.mysite.org%3Alatest
and/etc/resty-auto-ssl/storage/file/www.someone.org%3Alatest
and restart openresty to force new certs to be generated.Why wasn't resty auto ssl renewing them and what can I do to prevent this from happening again in the future?
Edit:
This is the actual logged error:
I am also getting this one, but less commonly: