Elevated badNonce
and malformed
errors when trying to issue certificates #17
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm seeing lots of intermittent errors while issuing certificates since I upgraded my service to greenlock from letsencrypt. About 90% of the errors are
badNonce
, and the rest aremalformed
. Retrying a few times usually results in getting a certificate issued.Looks like this is related to #7.
We are on node v10.15.0 using
All of them are the latest versions, except
rsa-compat
, but looking at the changes, don't see anything that would fix the problem by bumping to v2.0.2. In any case esa-compat@1.9.2 is a dependency of acme-v2@1.5.2, so can't really bump it till there is a newacme-v2
release.badNonce
error trace -malformed
error trace -Hi,
Is there anything I can do to help debug this?
According to the Lets Encrypt folks, one of the reasons for getting a badNonce error is either requests are made from a different IP, or the SSL connection is not reused -
Looking at the code for
urequest
, it looks like it uses the default https global agent, and does not set keepAlive totrue
. I tried to set the default totrue
, but that didn't seem to help.@coolaj86 any ideas on what I might be missing?
@elssar Thanks so much for this!
That makes a lot of sense, but I never would have guessed.
I'll take a look at at urequest and make sure that
That may explain why even the default agent is having this issue.
I'm about to push a change to urequest that will allow
agent
to be passed in. I think that creating an agent with only one request per server may help. We shall see.I've been doing a number of things tonight. I did modify
urequest@1.3.7
to respectagent
when passed in. I'll try to test the rest tomorrow, but feel free to try it and let me know.Also, I don't get these errors myself. If you come up with a way to reproduce it that would be awesome.
@coolaj86 I haven't been able to reproduce this outside of my production environment, but I think I have an idea how to do it. Will let you know I am successful.
Any updates?
I'd be interested to know if this still happens in Greenlock v2.7+.
I made a bunch of updates, added a bunch of tests, and got some corner cases taken care of.
I don't think anything that I did would directly affect this but, aside from the backwards compatibility shims which became more complex, the core flow of the code is a lot simpler now.
@coolaj86, sorry I couldn't reproduce this in my beta environment, and since this was causing problems in production we moved back to the letsencrypt module. Will revisit this in the next couple of weeks.
We now offer business support at an hourly rate, so if you're interested in pairing together for an hour to look at specifics send a message to aj@therootcompany.com and we can schedule some time to take a look.
Fixed in v3