Submitted by bobemoe on Fri, 10/04/2019 - 08:28
I posted originally here but I think it may have been the wrong place https://www.virtualmin.com/node/67264
The problem is that virtualmin is trying to renew a lets encrypt cert but is getting the error: "You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry."
I think the cause may be that I used certbot to renew some certs outside of virtualmin.
I think the problem may be that virtualmin stores the expiry date somewhere rather than checking the actual cert, and this has become out of sync.
Any ideas if/where these dates are stored and how I can get them back in sync?
Cheers :)
Status:
Fixed (pending)
Comments
Submitted by scotwnw on Fri, 10/04/2019 - 14:00 Pro Licensee Comment #1
I ran into this also. Looks like virtualmin looks at certs in the home/domain folder but when certbot runs it sees the left over cert in /etc/letsencrypt/something. The 3 cert file dates dont all correspond either. Like a partial renew may have happened previously? The error is from certbot seeing the cert in the letsencrypt folder. Why all of a sudden virtulmin isn't deleting those or why it started needed to be deleted. Not sure.
Submitted by Jfro on Sat, 10/05/2019 - 10:10 Comment #2
some info ...https://www.virtualmin.com/node/67390
Submitted by JamieCameron on Sat, 10/05/2019 - 11:04 Comment #3
The next release of Webmin will fix this by forcing an renewal, even if it's not close to expiry.
Submitted by bobemoe on Sun, 10/06/2019 - 05:39 Comment #4
Thanks for the info, and awesome news of the fix! :) When will the next release be out? I'm wondering whether to clean up manually or wait so we can confirm the fix has sorted it?
Submitted by JamieCameron on Sun, 10/06/2019 - 22:59 Comment #5
If you want a quick fix for this, you can apply this patch : https://github.com/webmin/webmin/commit/e71c17ced77e17156256a0069015c7a6...
Submitted by bobemoe on Mon, 10/07/2019 - 03:55 Comment #6
Thanks. Curious, the patch failed as I didn't have --keep-until-expiring so I just added --force-renewal manually.
Submitted by bobemoe on Mon, 10/07/2019 - 04:45 Comment #7
It fixed it, the renewals are completing now :) thanks