Troubleshoot Certificate Manager
Fix a Let's Encrypt certificate that stays pending or fails to issue, a refused certificate request, and a refused private key.
These symptoms affect Certificate Manager, the Platform Resource that stores the certificates a Workload uses for Transport Layer Security (TLS) and reports each one’s state in its status field. They cover a Let’s Encrypt certificate that does not issue, and a request or an upload that the API refuses. A certificate refused in a Workload setting is a Workload symptom, under Troubleshoot Workloads. For where Certificate Manager acts on a request, refer to Request path.
A certificate stays pending
A Let’s Encrypt certificate does not leave the pending or challenge_verification status. In Azion Console, the Workload’s Digital Certificate field warns “This certificate is pending validation and HTTPS may not work until it’s validated”.
One of the names fails its challenge: in HTTP-01, Let’s Encrypt fetches a file from each hostname, so every name must point to Azion. In DNS-01, it reads an _acme-challenge record in the domain’s DNS, as Domain validation explains.
- Check the names: a certificate requested from the Workload form in Azion Console covers the Workload’s Domains, so confirm that each one is correct.
- Point every name at Azion for HTTP-01, alternative names included.
- Add the CNAME for DNS-01 at another DNS provider: name it
_acme-challenge.<your-domain>, with the value<your-domain>.letsencrypt.azion.com. In Edge DNS, Azion writes the record itself. - Check the CNAME records again if the certificate keeps failing: Azion retries a failed issuance at increasing intervals, as Issuance time and retries lists.
After a later attempt validates, the certificate reads active while a Workload uses it, or inactive until then. For the records step by step, refer to Request a Let’s Encrypt certificate.
A certificate request is refused with This account cannot use certain common or alternative names
A Let’s Encrypt request, a certificate signing request (CSR), or saving a new domain in Azion Console fails with This account cannot use certain common or alternative names because it does not have permission for their domain names.
The request carries a name in a domain that the account has no permission for. An azion.app hostname is refused too, even one that a Workload of the account holds, as Errors lists.
- Name only hostnames in domains your account has permission for, in
common_nameandalternative_names. - Request no certificate for an
azion.apphostname: withtls.certificateset tonull, the Workload presents the Azion SAN certificate, which covers theazion.apphostname and the workload domain. - Remove the refused domain from Domains in Azion Console: adding a domain switches Digital Certificate from Azion (SAN) to New Let’s Encrypt Certificate (DNS-01). Save then requests that certificate before it saves the Workload, and saves nothing when the request is refused.
An accepted request returns the certificate’s id with the pending status, and Azion Console shows “Your workload has been updated”.
A certificate fails to issue
A Let’s Encrypt certificate reads failed. In Azion Console, the Workload’s Digital Certificate field warns “This digital certificate failed and HTTPS cannot be used until the issue is resolved”.
Validation failed, and Azion stores the reason in the certificate’s status_detail field. One value names the hostname whose record to check:
Another value names no hostname, so check every name on the certificate, as A certificate stays pending lists:
Read status_detail from any interface, then correct the record or the name it points to:
- Azion Console: in Certificate Manager, the error icon of the certificate carries it.
- Azion CLI:
azion describe digital-certificate --digital-certificate-id <certificate-id> --format jsonprints it besidestatus. - API:
GET /v4/workspace/tls/certificates/<certificate-id>returns it with the certificate.
A later attempt in the retry schedule can then issue the certificate, and an issued certificate in use reads active, with status_detail at "".
An uploaded private key is refused
Uploading a server certificate fails with The provided private key is invalid. Please check the key and try again.
The private_key that arrived with the certificate is not one the API can read, as Errors lists.
- Send the key that matches the certificate.
- Send the key in PEM, with its
-----BEGINand-----ENDlines and no passphrase, as Key algorithms and formats lists. - Write the key as one JSON string in an API body, with each line break written as
\n.
Azion CLI then prints Created Digital Certificate with ID <certificate-id>, and the certificate reads inactive until a Workload uses it.