-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Error, can not get domain token entry *.domain.tld for dns-01 #4972
Comments
Hi, |
I'll pass your thanks onto my wife. lol. I was up until 4am reading 13.5k lines of bash debugging output. #insanethings You can pull this if you use Docker: |
I am getting the same for |
If you're running with
|
|
@daBee So, EDIT: But thanks. You made me look and I found a second instance of that bad line and updated it in my PR #4973. |
Thanks for fix, saved me some precious time! |
OK, that worked for domain 1 and 2. I have a third domain that won't even issue.
Not sure if this is related. I'm also having |
It seems to be a problem with resolving the challenge. I would post in Discussions and include a full debug log. Also, I would check your DNS to ensure the challenge entry doesn't already exist from a previously failed run. You might need to delete it manually. |
OK, just to be clear, this is not |
Same problem here. I had to switch from Zerossl to Letsencrypt, and renew now is ok, without errors. |
OK good to know. I was going to try switching providers today. |
@daBee @nmartinho FWIW, everything you are describing matches the symptoms I was also experiencing. In my situation, it was not the specific provider (ZeroSSL over LetsEncrypt), it was the fact that the provider had a pending and unresolved challenge. The code fix I provided should resolve the issue you're experiencing. You can manually apply the changes in PR #4973 to your local file. |
I did make those changes, and only a single domain worked. I changed to |
@daBee Just to confirm, you changed both lines? |
Yes I did. The line numbers were different, but I found them. |
Are you running the latest acme.sh? |
No you told me that |
My apologies for the confusion. I meant that |
OK that's how I understood your |
FWIW, you should consider doing an upgrade (then reapplying my patch). I can't find the text (or anything similar to) |
I did my last
|
Hmm, ok, well that isn't it then. Did you get a chance to post in Discussions yet? I was hoping to see your full debug log. I was also going to ask if you could try it with |
No I didn't post because the new provider worked. I had to get the certs working. BTW the reason I tripped over this is because the |
your crontab should have a call to |
For better or worse, I am now experiencing the same problem you are/were seeing. Investigating now.
|
I solved my problem. Two things were going on... 1) I had changed my DNS provider for the domain being renewed and that change was not yet reflected in the config file (most likely due to the second issue); 2) my script I run to call --issue was passing --keylength and --always-force-new-domain-key after each domain (-d domain.com) parameter and this somehow pissed acme.sh off. I didn't bother to figure out why it was pissed off, I just removed the duplicate parameters being passed and the issue went away. @daBee I suspect ultimately the problem was due to the DNS provider change. So, double-check your *.conf file and if the DNS provider is wrong, fix it by calling |
I wasn't using DNS for the test. This was all http/https. |
That is only for certificates created without ACME. You 100% can do wildcard ACME certificates on the Free plan. |
Steps to reproduce
Honestly, not quite sure how to get the CA stuck in this pickle, but I can tell you the symptoms.
(note: strings have been randomized to look real and protect security)
The Problem
The problem that is happening is due to the code on line 4693:
entry="$(echo "$response" | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')"
where this is assuming the end of the challenge array item must be a
}
and the key:value pair of"error":{}
is throwing a wrench in that.The Solution (closer anyway, not perfect)
I have come up with a replacement for line 4693:
entry="$(echo "$response" | sed -n 's#"challenges":\[\([^]]*\)\]#\1#p' | sed 's#\(\}\),\({\)#\1\n\2#' | grep '"type":"'$vtype'"')"
It isn't perfect, but without a tool like jq and to remain POSIX compliant, it is extremely difficult to cover absolutely every case. For example, if, for some reason, the challenge array items start containing arrays themselves, we'll be back in the same boat. At least this should work until then. :-)
The text was updated successfully, but these errors were encountered: