certmagic: [Gandi] Wrong DNS TXT record causes unable to get certificate

What version of the package are you using?

CADDY_VERSION=v2.2.0 xcaddy build --with github.com/caddy-dns/gandi

What are you trying to do?

Use Caddy as usual, with HTTPS solves with dns-01 challenge

What steps did you take?

cloud.skynewz.dev, *.cloud.skynewz.dev
tls contact@skynewz.dev {
	dns gandi {env.GANDI_API_TOKEN}
}
respond "Hello, world!"

What did you expect to happen, and what actually happened instead?

Caddy can get my certificate and alright ! Instead, something creates a TXT record that Caddy cannot solve and Caddy never start, lopping on resolving the challenge

Please link to any related issues, pull requests, and/or discussion

https://github.com/caddyserver/caddy/issues/3787

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (1 by maintainers)

Most upvoted comments

Okay I managed to reproduce the issue on Go 1.15.1 with the Gandi plugin and Caddy v2.2.0 compiled with xcaddy with the following caddyfile

pad.leon.re {
	tls {
		dns gandi {env.GANDI_API_TOKEN}
	}
	respond "Hello, world!"
}

The record is correctly created in the zone and seems to comply with the RFC

_acme-challenge.pad.leon.re 10800 IN TXT "REDACTED"

It appears certmagic is timeouting when trying to get the record.

Oct 14 17:23:01 bifrost caddy[307390]: {"level":"error","ts":1602688981.3301451,"logger":"tls.obtain","msg":"will retry","error":"[pad.leon.re] Obtain: [pad.leon.re] solving challenges: waiting for solver *certmagic.DNS01Solver to be ready: timed out waiting for record to fully propagate; verify DNS provider configuration is correct - last error: <nil>  (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/16115184/166956908) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)","attempt":2,"retrying_in":120,"elapsed":307.026609925,"max_duration":2592000}

I will try to investigate further when I get some time.