Skip to content

Adds troubleshooting guide for host missmatch error#2023

Open
epatmalnieks-gc wants to merge 1 commit into
cert-manager:masterfrom
epatmalnieks-gc:contribfest-epatmalnieks
Open

Adds troubleshooting guide for host missmatch error#2023
epatmalnieks-gc wants to merge 1 commit into
cert-manager:masterfrom
epatmalnieks-gc:contribfest-epatmalnieks

Conversation

@epatmalnieks-gc

@epatmalnieks-gc epatmalnieks-gc commented Mar 24, 2026

Copy link
Copy Markdown

There is an open issue of missing troubleshooting info for ACME server URL host and ACME private key registration host differ This issue is mentioned also on issue 3394

This PR adds a simple description of the error and what would be the reasonable place to look for.

@cert-manager-prow cert-manager-prow Bot added the dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. label Mar 24, 2026
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign munnerz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 24, 2026
@netlify

netlify Bot commented Mar 24, 2026

Copy link
Copy Markdown

Deploy Preview for cert-manager ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9a2de01
🔍 Latest deploy log https://app.netlify.com/projects/cert-manager/deploys/6a31386ef739600007b1ba13
😎 Deploy Preview https://deploy-preview-2023--cert-manager.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@epatmalnieks-gc epatmalnieks-gc force-pushed the contribfest-epatmalnieks branch from 35581bd to 6a34733 Compare March 24, 2026 16:25
@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Mar 24, 2026
Signed-off-by: Edgars Patmalnieks <epatmalnieks@gocardless.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Not ready to approve

The newly added troubleshooting text is currently misleading/inaccurate about what is mismatching and should be corrected to avoid sending users to the wrong remediation path.

Pull request overview

This PR adds troubleshooting guidance to the ACME troubleshooting documentation for the error ACME server URL host and ACME private key registration host differ, addressing the lack of documented remediation steps referenced in website issue #197.

Changes:

  • Add a new “Common errors” bullet describing the ACME account host mismatch error and where to investigate.
File summaries
File Description
content/docs/troubleshooting/acme.md Adds a new troubleshooting entry for the ACME account host mismatch error.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* `Failed to update ACME account:400 urn:ietf:params:acme:error:invalidEmail`: the email you specified in the Issuer configuration isn't valid.
* `Error initializing issuer: Failed to register ACME account: secrets "acme-key" already exists`: there might be a leftover account from a previous issuer that is no longer valid, you should remove the secret so it can be recreated.
* `Error accepting challenge: 400 urn:ietf:params:acme:error:malformed: Unable to update challenge :: authorization must be pending`: this suggests that the authorization was not in 'pending' state at a time when cert-manager sent a request to the ACME server to accept the challenge. This may be because the domain validation has already failed and the authorization has been marked as 'invalid'. Check the authorization URL on the status of the `Order` or `Challenge` to see the status of the authorization and any additional information.
* `ACME server URL host and ACME private key registration host differ` This error means that host resolved by the node differs from the host in your private key. Please check your `/etc/resolv.conf` if the correct host is resolved.

@wallrj-cyberark wallrj-cyberark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing issue #197 — this documentation gap has been open for years and is worth filling. The Copilot review has independently flagged the same concerns below.

I checked the source code and found a few issues with the technical explanation.

1. This is not an error — it is an info-level log message.

The code at pkg/issuer/acme/setup.go:291 uses log.V(logf.InfoLevel).Info(...). When the condition triggers, cert-manager clears the cached account URI and re-checks the ACME registration. It is a self-healing action, not a failure.

2. The explanation of the cause is inaccurate.

The PR says "host resolved by the node differs from the host in your private key". The private key does not contain a host. What the code actually compares (line 290) is parsedAccountURL.Host (from issuer.status.acme.uri — the ACME account URL cached from a previous registration) against parsedServerURL.Host (from issuer.spec.acme.server — the configured ACME server URL).

Common causes include:

  • Changing the ACME server URL (e.g. from staging to production)
  • A stale search domain in /etc/resolv.conf causing DNS to resolve the ACME server hostname differently (this is the scenario from cert-manager/cert-manager#3394)
  • Reusing a private key Secret from a different Issuer or cluster

3. Missing colon after the backtick-quoted message.

The existing bullet points all use the pattern `message`: explanation. The new entry is missing the colon separator.

A suggested replacement:

ACME server URL host and ACME private key registration host differ: this is an informational message (not an error) indicating that the host in the configured ACME server URL (spec.acme.server) differs from the host where the ACME account was previously registered (status.acme.uri). cert-manager will automatically clear the cached registration and re-check the account. Common causes include: changing the ACME server URL (e.g. from staging to production), a stale search domain in /etc/resolv.conf (see cert-manager/cert-manager#3394), or reusing a private key Secret from a different Issuer. If the re-registration fails, check /etc/resolv.conf for incorrect search domains, or delete the private key Secret referenced by the Issuer to force a clean re-registration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants