Closed masterkain closed 2 years ago
Here are the logs of our Caddy
service trying to generate a certificate
caddy_1 | {"level":"info","ts":1630421791.3573334,"logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"www-dev.bsmart.it","challenge_type":"dns-01","ca":"https://acme.zerossl.com/v2/DV90"}
caddy_1 | {"level":"error","ts":1630421792.2646983,"logger":"tls.issuance.acme.acme_client","msg":"cleaning up solver","identifier":"www-dev.bsmart.it","challenge_type":"dns-01","error":"no memory of presenting a DNS record for www-dev.bsmart.it (probably OK if presenting failed)"}
caddy_1 | {"level":"error","ts":1630421792.6663103,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"www-dev.bsmart.it","issuer":"acme.zerossl.com-v2-DV90","error":"[www-dev.bsmart.it] solving challenges: presenting for challenge: adding temporary record for zone bsmart.it.: InvalidChangeBatch: InvalidChangeBatch: [Tried to create resource record set [name='_acme-challenge.www-dev.bsmart.it.', type='TXT'] but it already exists]\n\tstatus code: 400, request id: baf7bac4-aa8a-46f3-82b4-802f89058d67 (order=https://acme.zerossl.com/v2/DV90/order/6vh4c9bOo1GhEZYdx-H51Q) (ca=https://acme.zerossl.com/v2/DV90)"}
caddy_1 | {"level":"error","ts":1630421792.6665938,"logger":"tls.obtain","msg":"will retry","error":"[www-dev.bsmart.it] Obtain: [www-dev.bsmart.it] solving challenges: presenting for challenge: adding temporary record for zone bsmart.it.: InvalidChangeBatch: InvalidChangeBatch: [Tried to create resource record set [name='_acme-challenge.www-dev.bsmart.it.', type='TXT'] but it already exists]\n\tstatus code: 400, request id: baf7bac4-aa8a-46f3-82b4-802f89058d67 (order=https://acme.zerossl.com/v2/DV90/order/6vh4c9bOo1GhEZYdx-H51Q) (ca=https://acme.zerossl.com/v2/DV90)","attempt":2,"retrying_in":120,"elapsed":72.9680597,"max_duration":2592000}
maybe a matter of caddyserver/certmagic
Yeah, I'm seeing the same thing
2022/01/01 18:00:42.340 ERROR tls.issuance.acme.acme_client cleaning up solver {"identifier": "dev.redacted.com", "challenge_type": "dns-01", "error": "no memory of presenting a DNS record for dev.redacted.com (probably OK if presenting failed)"}
2022/01/01 18:00:43.265 ERROR tls.obtain could not get certificate from issuer {"identifier": "dev.redacted.com", "issuer": "acme.zerossl.com-v2-DV90", "error": "[dev.redacted.com] solving challenges: presenting for challenge: adding temporary record for zone redacted.com.: InvalidChangeBatch: InvalidChangeBatch: [Tried to create resource record set [name='_acme-challenge.dev.redacted.com.', type='TXT'] but it already exists]\n\tstatus code: 400, request id: 4c5fca86-7c22-4c5d-8c55-1c491bdd08a4 (order=https://acme.zerossl.com/v2/DV90/order/ENTiKLE1WwM-hZ-3FcF0AA) (ca=https://acme.zerossl.com/v2/DV90)"}
I ran into this with caddy and I believe it was due to me shutting down Caddy as it was acquiring a cert the first time around.
Time will tell, but I think I permanently fixed it by not restarting caddy until the SSL cert was acquired. And I made Caddy work this time by manually deleting the DNS record
Hi, I have been debugging this issue as I faced this couple of times in last 4 months, and found the following error which can be the issue.
{"level":"error","ts":1648715185.0685196,"logger":"tls.issuance.acme.acme_client","msg":"cleaning up solver","identifier":"*.redacted.com","challenge_type":"dns-01","error":"deleting temporary record for zone redacted.com.: InvalidInput: InvalidInput: 1 validation error detected: Value '4659767778' at 'changeBatch.changes.1.member.resourceRecordSet.tTL' failed to satisfy constraint: Member must have value less than or equal to 2147483647\n\tstatus code: 400, request id: a8a513f1-5911-48a9-8dda-ab10e9c2daa2"}
Note: The caddy binary I used was built using a patch in my PR referenced above.
Edit: This PR https://github.com/libdns/route53/pull/12 should fix the issue.
@mholt It looks like @PhoenixPeca is no longer active on this repo. Can we appoint a new maintainer here as well?
@eth-limo Yep, thanks for the reminder. Added.
hello, we are trying to make this module work on caddy 2.3.4, and we hit an issue with the DNS entries creation.
starting clean (no dns records, no caddy data volume) during startup caddy creates (and deletes, and creates, etc.) records on route 53 until it fails saying that the records (that the plugin just created) already exists and cannot proceed.
we tried this procedure starting from a clean slate on 4 machines (not at the same time) and it worked on 2 but failed on the other two.
we are trying to make this setup useable by more than one machine, we had this setup with caddy-gen (v1) and everything worked; here we are hitting the fact that the plugin says the records already exists and stops.
I tried looking at the source of this and libdns/route53 and I see there are methods to update the records instead of creating them, but I'm unsure where/how they are called.
any clue what might be wrong?