Troubleshooting
Errors from Azure are part of the plugin’s error message (Failed to add TXT record
for domain ..., Failed to remove ..., Failed to check ...). Run certbot with
-v for more output and --debug for full tracebacks. The complete log is
/var/log/letsencrypt/letsencrypt.log; in Nginx Proxy Manager it is
/data/logs/letsencrypt.log in the container.
Plugin not listed by certbot plugins
The plugin was installed into a different Python environment than certbot. Compare the locations:
pip show certbot certbot-dns-azure-modern
which certbot
Install the plugin with the pip that belongs to the certbot you run, for example
/opt/certbot/bin/pip. Nginx Proxy Manager installs the plugin on demand, see
Nginx Proxy Manager. A snap-installed certbot accepts plugins
from snaps only; this fork ships none, so install certbot with pip instead.
Configuration errors
Most of these appear right at the start. Resource ID and domain errors appear when certbot reaches that name; records already written for other names are removed again.
Message |
Fix |
|---|---|
|
No complete method in the top level or in that section. Check the key names,
that boolean keys are |
|
Add a |
|
Put a colon between domain and resource ID: |
|
Each zone may appear in one mapping only, across all credential sets. |
|
Use |
|
Copy the resource ID of the resource group (or zone, or record) again; see Configuration. |
|
No configured domain equals the name or is a parent domain of it. Add a mapping for the zone that serves the name, see “How domains are matched” in Configuration. |
|
Pass a positive whole number. |
Authentication errors (AADSTS codes)
AADSTS7000215invalid client secret: the value is wrong. Copy the secret’s Value, not its Secret ID.AADSTS7000222client secret expired: create a new secret and update the config, see Secret expiry and rotation.AADSTS700016application not found: client ID and tenant ID do not belong together.AADSTS90002tenant not found: checkdns_azure_tenant_idand thatdns_azure_environmentmatches the cloud the tenant lives in.Managed identity unavailable: managed identities work only on Azure resources with an identity attached and on Azure Arc-enabled servers. Use a service principal elsewhere.
Azure CLI: the user running certbot must be the one who ran
az login; cron jobs and services usually run as root. Expired sessions and multifactor prompts make the CLI unsuitable for unattended renewals, see Authentication.
Zone or record not found (HTTP 404)
The resource ID in the mapping names the wrong subscription or resource group, or the domain in the mapping is not the exact name of the zone in Azure. With a record mapping, the record must exist before the first run.
Validation fails although the record was created
Check what public DNS returns while certbot is waiting:
dig +short TXT _acme-challenge.example.com
Nothing at all: the zone in Azure is not the one the domain delegates to. Compare the domain’s NS records with the name servers of the Azure zone.
A CNAME: you are using delegation; make sure the target matches the mapping, see DNS delegation and least privilege.
The right value, but the request failed with
No TXT record foundorNXDOMAIN looking up TXT: Let’s Encrypt checked too early. Raise--dns-azure-propagation-secondsto 30, see Propagation time.
Unsafe permissions on credentials configuration file
Other users can access the config file. Run chmod 600 on it, see
Protect the config file.
AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Extension'
Certbot fails to start because the upstream package certbot-dns-azure downgraded
certbot and acme to 3.3.0. Replace it with this fork as described in
Switching from certbot-dns-azure; in Nginx Proxy Manager, upgrade to 2.16.0 or later.
Report a bug
Open an issue at
https://github.com/cloudchristoph/certbot-dns-azure-modern/issues with the certbot
and plugin versions (pip show certbot certbot-dns-azure-modern), the command you
ran and the relevant part of the certbot log. Remove secrets, subscription IDs and
tenant IDs before posting.