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

I am getting Too many certificates (5) already issued for this exact set of domains in the last 168 hours #230

Open
patolax opened this issue May 6, 2024 · 20 comments

Comments

@patolax
Copy link
Contributor

patolax commented May 6, 2024

I am getting this error on Azure

"Fail to load resource from 'https://acme-v02.api.letsencrypt.org/acme/new-order'. urn:ietf:params:acme:error:rateLimited: Error creating new order :: too many certificates (5) already issued for this exact set of domains in the last 168 hours:"

Based on this discussion Certes package has to be updated
https://community.letsencrypt.org/t/getting-error-when-trying-to-get-a-new-certificate/213226/26

Can not find issuer 'C=US,O=Internet Security Research Group,CN=ISRG Root X1' for certificate 'C=US,O=Let's Encrypt,CN=R3'.

Any idea what we should do here?

@patolax
Copy link
Contributor Author

patolax commented May 8, 2024

@ffMathy please let us know if this will be fixed anytime soon. My production env is down at the moment. We have to find some other solution if this is not going to be fixed. Thanks.

@ffMathy
Copy link
Owner

ffMathy commented May 8, 2024

Hi! A PR is welcome where the NuGet package is updated.

@patolax
Copy link
Contributor Author

patolax commented May 8, 2024

I tried, but with and without Nuget update in both cases, this test case is failing.

image

@ffMathy
Copy link
Owner

ffMathy commented May 8, 2024

I'm sorry, I just don't have much time at the moment. Is it possible for you to switch to LettuceEncrypt?

If your servers are down, can you trigger the renewal process manually?

@patolax
Copy link
Contributor Author

patolax commented May 8, 2024

I have updated the code here and fixed the unit tests. Not sure if I fixed the issue or did something sub optimal.

I don't have access to this repo, so changes are there in my repo

https://github.com/patolax/EncryptWeMust

only a few changes, 2 project files, and minor changes to
FluffySpoon.AspNet.EncryptWeMust-master\FluffySpoon.AspNet.EncryptWeMust\src\FluffySpoon.AspNet.EncryptWeMust\Certes\LetsEncryptClient.cs

@patolax
Copy link
Contributor Author

patolax commented May 17, 2024

@ffMathy I can confirm that after my updates certificate renewal is now working. I had to compile my version of the lib and refer to that to test in the production environment.

It would be great if you could release a new version after these two line changes or allow me to create a PR. Thank you!

@ffMathy
Copy link
Owner

ffMathy commented May 17, 2024

Make a PR, then I will get it merged immediately 😄

Everybody can create PRs for any repo on GitHub. Just go to your own fork, and click "create pull request".

@ffMathy
Copy link
Owner

ffMathy commented May 17, 2024

Oh, you recloned the repo and republished it. Please use the official GitHub forking feature. Then a PR can be created more easily.

@patolax
Copy link
Contributor Author

patolax commented May 17, 2024

Thanks. Here it is.

#231

BTW, there is another thing related to staging I think.

https://community.letsencrypt.org/t/can-not-find-issuer-c-us-o-staging-internet-security-research-group-cn-staging-doctored-durian-root-ca-x3-for-certificate-c-us-o-staging-internet-security-research-group-cn-staging-pretend-pear-x1/147613/10

But I don't know where I can find Issuers. This is what I was able to find in LettuceEncrypt.

 var pfxBuilder = _pfxBuilderFactory.FromChain(certificateChain, certKey);

 _logger.LogDebug(
     "Adding {IssuerCount} additional issuers to certes before building pfx certificate file",
     _options.Value.AdditionalIssuers.Length + _certificateAuthority.IssuerCertificates.Length);

 foreach (var issuer in _options.Value.AdditionalIssuers.Concat(_certificateAuthority.IssuerCertificates))
 {
     pfxBuilder.AddIssuer(Encoding.UTF8.GetBytes(issuer));
 }

@ffMathy
Copy link
Owner

ffMathy commented May 17, 2024

I merged it, but then I spotted that you are now omitting a PreferredChain option, so I reverted it again. Can you elaborate on this?

@patolax
Copy link
Contributor Author

patolax commented May 17, 2024

test cases failed if you don't remove it

Code from LettuceEncrypt
return await order.Generate(csrInfo, privateKey);

change from my PR
await order.Generate(_options.CertificateSigningRequest, keyPair);

@ffMathy
Copy link
Owner

ffMathy commented May 17, 2024

What happens if you instead set PreferredChain to "ISRG Root X2" instead of the default "ISRG Root X1"?

I don't think we should remove the PreferredChain call. Or at least we should remove the property from the LetsEncryptOptions object too.

@patolax
Copy link
Contributor Author

patolax commented May 20, 2024

@ffMathy the following change still fails tests. It only passes if I remove the parameter as I have done in my PR.

public string PreferredChain { get; set; } = "ISRG Root X2";

@ffMathy
Copy link
Owner

ffMathy commented May 21, 2024

Alright. If you remove the property from the setting object too, then I'll merge it. Thanks.

@patolax
Copy link
Contributor Author

patolax commented May 21, 2024

Done

@patolax
Copy link
Contributor Author

patolax commented May 21, 2024

#249

@patolax
Copy link
Contributor Author

patolax commented May 22, 2024

@ffMathy has the new package been released? I could not find it from Nuget.

@ffMathy
Copy link
Owner

ffMathy commented Jun 18, 2024

I have finally fixed the issue causing this to not be released. It should be out soon.

@patolax
Copy link
Contributor Author

patolax commented Jul 24, 2024

@ffMathy do not see the new package now. My production server is still using the 1.171.0 and failing. The certificate is about to expire in a week. Is it possible to release this anytime soon? thanks a lot.

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

2 participants