You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.
We are randomly experiencing cases where we get an error that is hit is "CSR not signed by referenced private key", which indicates that the secret got changed from the start of the reconcile process. We enabled StableCertificateRequestName=true
to see if it would help with the issue but it hasn't.
This seems to indicate 2 self sign cert requests for the same cert are inflight at the same time.
The second CR request fails and the certificate is not being renewed ever again.
The occurrence of the this issue is random with the cert process working happily across multiple clusters 99% of the time.
Reacted by Roger Chen, Tom Elliot, Dimitri Koshkin, Sonny, kathleen, s-rodriguez, Ashu Singh, Aakash Agarwal and trumme21
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale
I0124 05:35:49.533487 1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="capz-system/capz-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capz-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 05:35:49.576483 1 conditions.go:192] Found status change for Certificate "capg-serving-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2024-01-24 05:35:49.576470051 +0000 UTC m=+32.890554247
I0124 05:35:49.715365 1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="capg-system/capg-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capg-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 05:35:49.835850 1 conditions.go:192] Found status change for Certificate "capg-serving-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2024-01-24 05:35:49.835826172 +0000 UTC m=+33.149910379
I0124 05:35:49.932008 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capvcd-serving-cert-1" condition "Approved" to 2024-01-24 05:35:49.93199695 +0000 UTC m=+33.246081153
I0124 05:35:50.129423 1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="capg-system/capg-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capg-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 05:35:50.131927 1 conditions.go:192] Found status change for Certificate "capg-serving-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2024-01-24 05:35:50.131917255 +0000 UTC m=+33.446001460
I0124 05:35:50.139891 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capvcd-serving-cert-1" condition "Ready" to 2024-01-24 05:35:50.139882652 +0000 UTC m=+33.453966852
I0124 05:35:50.404292 1 conditions.go:192] Found status change for Certificate "capvcd-serving-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2024-01-24 05:35:50.404281844 +0000 UTC m=+33.718366044
I0124 05:35:50.658932 1 controller.go:162] "cert-manager/certificates-issuing: re-queuing item due to optimistic locking on resource" key="capvcd-system/capvcd-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capvcd-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 05:35:52.054534 1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="capvcd-system/capvcd-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capvcd-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 05:35:52.239774 1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="capv-system/capv-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capv-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 05:35:52.484646 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capv-serving-cert-1" condition "Approved" to 2024-01-24 05:35:52.484635647 +0000 UTC m=+35.798719850
I0124 05:35:52.564830 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capz-serving-cert-1" condition "Approved" to 2024-01-24 05:35:52.564817605 +0000 UTC m=+35.878901797
I0124 05:35:52.672141 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capz-serving-cert-1" condition "Ready" to 2024-01-24 05:35:52.67213201 +0000 UTC m=+35.986216208
E0124 05:35:52.672192 1 selfsigned.go:194] "cert-manager/certificaterequests-issuer-selfsigned/sign: Error generating certificate template" err="CSR not signed by referenced private key" resource_name="capz-serving-cert-1" resource_namespace="capz-system" resource_kind="CertificateRequest" resource_version="v1"
I0124 05:35:52.676554 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capv-serving-cert-1" condition "Ready" to 2024-01-24 05:35:52.676544375 +0000 UTC m=+35.990628570
I0124 05:35:52.808312 1 conditions.go:192] Found status change for Certificate "capz-serving-cert" condition "Issuing": "True" -> "False"; setting lastTransitionTime to 2024-01-24 05:35:52.808301152 +0000 UTC m=+36.122385362
I0124 05:35:53.069030 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capz-serving-cert-1" condition "Approved" to 2024-01-24 05:35:53.069018391 +0000 UTC m=+36.383102594
I0124 05:35:53.090294 1 trigger_controller.go:173] "cert-manager/certificates-trigger: Backing off from issuance due to previously failed issuance(s). Issuance will next be attempted at 2024-01-24 06:35:52.000000906 +0000 UTC m=+3635.314085103" key="capz-system/capz-serving-cert"
I0124 05:35:53.091451 1 conditions.go:192] Found status change for Certificate "capv-serving-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2024-01-24 05:35:53.091442578 +0000 UTC m=+36.405526782
I0124 05:35:53.287844 1 trigger_controller.go:173] "cert-manager/certificates-trigger: Backing off from issuance due to previously failed issuance(s). Issuance will next be attempted at 2024-01-24 06:35:52.000000962 +0000 UTC m=+3635.314085147" key="capz-system/capz-serving-cert"
I0124 05:35:53.332885 1 controller.go:162] "cert-manager/certificates-issuing: re-queuing item due to optimistic locking on resource" key="capv-system/capv-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capv-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 05:35:53.360598 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capz-serving-cert-1" condition "Ready" to 2024-01-24 05:35:53.36058677 +0000 UTC m=+36.674670973
I0124 05:35:53.395395 1 trigger_controller.go:173] "cert-manager/certificates-trigger: Backing off from issuance due to previously failed issuance(s). Issuance will next be attempted at 2024-01-24 06:35:52.000000945 +0000 UTC m=+3635.314085139" key="capz-system/capz-serving-cert"
I0124 05:35:53.479670 1 trigger_controller.go:173] "cert-manager/certificates-trigger: Backing off from issuance due to previously failed issuance(s). Issuance will next be attempted at 2024-01-24 06:35:52.000001345 +0000 UTC m=+3635.314085539" key="capz-system/capz-serving-cert"
I0124 06:35:52.003178 1 trigger_controller.go:194] "cert-manager/certificates-trigger: Certificate must be re-issued" key="capz-system/capz-serving-cert" reason="DoesNotExist" message="Issuing certificate as Secret does not exist"
I0124 06:35:52.003209 1 conditions.go:192] Found status change for Certificate "capz-serving-cert" condition "Issuing": "False" -> "True"; setting lastTransitionTime to 2024-01-24 06:35:52.003203682 +0000 UTC m=+3635.317287888
I0124 06:35:52.285601 1 issuing_controller.go:324] "cert-manager/certificates-issuing: next private key does not match CSR public key, waiting for requestmanager controller" key="capz-system/capz-serving-cert" resource_name="capz-serving-cert" resource_namespace="capz-system" resource_kind="Certificate" resource_version="v1" resource_name="capz-serving-cert-1" resource_namespace="capz-system" resource_kind="CertificateRequest" resource_version="v1" resource_name="capz-serving-cert-nln5j" resource_namespace="capz-system" resource_kind="Secret" resource_version="v1"
I0124 06:35:52.298983 1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="capz-system/capz-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capz-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 06:35:52.309034 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capz-serving-cert-1" condition "Approved" to 2024-01-24 06:35:52.309027317 +0000 UTC m=+3635.623111520
I0124 06:35:52.335004 1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "capz-serving-cert-1" condition "Ready" to 2024-01-24 06:35:52.334996744 +0000 UTC m=+3635.649080930
I0124 06:35:52.366787 1 conditions.go:192] Found status change for Certificate "capz-serving-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2024-01-24 06:35:52.366778511 +0000 UTC m=+3635.680862718
I0124 06:35:52.440098 1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="capz-system/capz-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capz-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 06:35:52.445914 1 conditions.go:192] Found status change for Certificate "capz-serving-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2024-01-24 06:35:52.44590579 +0000 UTC m=+3635.759989996
I0124 06:35:52.502773 1 controller.go:162] "cert-manager/certificates-issuing: re-queuing item due to optimistic locking on resource" key="capz-system/capz-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capz-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0124 06:35:52.503208 1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="capz-system/capz-serving-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"capz-serving-cert\": the object has been modified; please apply your changes to the latest version and try again"
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Issues go stale after 6 months of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues remain open for an additional 3 months of inactivity and then close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
The trigger is a next-private-key rotation while a CertificateRequest built from the old key is still in flight: the self-signed issuer signs against the new key, finds the CSR was built with the old one, and fails the request with ErrorKeyMatch ("CSR not signed by referenced private key"). The requestmanager then deletes that stale request and rebuilds it against the new key, so the failure is spurious.
The bug is that the issuing controller acted on the Failed verdict before checking whether the request was merely stale, so it counted a spurious failure as a real one and imposed a failed-issuance backoff (default 1h, exponential to a 32h cap, but always retrying).
On the "not being renewed ever again" reports: the only concrete logs on this issue — @dkoshkin's v1.13 CAPZ dump above — actually show recovery. The request fails at 05:35:52, the trigger controller backs off to 06:35:52, and at 06:35:52 it re-issues (reason="DoesNotExist", i.e. the stale request was deleted and rebuilt) and the Secret is created. So self-healing was working; the certificate was stuck behind the backoff, not permanently broken. "Never renews again" is that 1h–32h delay read as permanent.
#9116 removes the delay: the issuing controller now settles the staleness question first and waits for the rebuild instead of failing. One narrow residual window remains — if the issuing controller's own secret informer still holds the old key when it reconciles the failed request, the check passes and it fails as before — so if anyone can still reproduce a genuinely permanent stall, please reopen with logs.
kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.
Activity
inteon commentedon Sep 12, 2023
Where are you seeing that error & what cert-manager version are you using?
marcingy commentedon Sep 12, 2023
We are on the latest released version so 1.12.x and we see it randomly when self sign certs are being created.
jetstack-bot commentedon Dec 11, 2023
Issues go stale after 90d of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale.Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with
/close.Send feedback to jetstack.
/lifecycle stale
jetstack-bot commentedon Jan 10, 2024
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with
/remove-lifecycle rotten.Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with
/close.Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale
dkoshkin commentedon Jan 24, 2024
We just saw this too creating a CAPZ Deployment
It did eventually create the Secret at 06:35
jetstack-bot commentedon Feb 24, 2024
Rotten issues close after 30d of inactivity.
Reopen the issue with
/reopen.Mark the issue as fresh with
/remove-lifecycle rotten./close
jetstack-bot commentedon Feb 24, 2024
@jetstack-bot: Closing this issue.
Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
inteon commentedon Feb 24, 2024
/reopen
jetstack-bot commentedon Feb 24, 2024
@inteon: Reopened this issue.
Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
inteon commentedon Feb 24, 2024
/remove-lifecycle rotten
25 remaining items
s-rodriguez commentedon Mar 10, 2025
/remove-lifecycle stale
cert-manager-bot commentedon Jun 8, 2025
Issues go stale after 90d of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale.Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with
/close./lifecycle stale
s-rodriguez commentedon Jun 9, 2025
/remove-lifecycle stale
cert-manager-bot commentedon Dec 8, 2025
Issues go stale after 6 months of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale.Stale issues remain open for an additional 3 months of inactivity and then close.
If this issue is safe to close now please do so with
/close./lifecycle stale
wallrj commentedon Aug 10, 2026
Diagnosis, for anyone landing here.
The trigger is a next-private-key rotation while a CertificateRequest built from the old key is still in flight: the self-signed issuer signs against the new key, finds the CSR was built with the old one, and fails the request with
ErrorKeyMatch("CSR not signed by referenced private key"). The requestmanager then deletes that stale request and rebuilds it against the new key, so the failure is spurious.The bug is that the issuing controller acted on the
Failedverdict before checking whether the request was merely stale, so it counted a spurious failure as a real one and imposed a failed-issuance backoff (default 1h, exponential to a 32h cap, but always retrying).On the "not being renewed ever again" reports: the only concrete logs on this issue — @dkoshkin's v1.13 CAPZ dump above — actually show recovery. The request fails at
05:35:52, the trigger controller backs off to06:35:52, and at06:35:52it re-issues (reason="DoesNotExist", i.e. the stale request was deleted and rebuilt) and the Secret is created. So self-healing was working; the certificate was stuck behind the backoff, not permanently broken. "Never renews again" is that 1h–32h delay read as permanent.#9116 removes the delay: the issuing controller now settles the staleness question first and waits for the rebuild instead of failing. One narrow residual window remains — if the issuing controller's own secret informer still holds the old key when it reconciles the failed request, the check passes and it fails as before — so if anyone can still reproduce a genuinely permanent stall, please reopen with logs.
Full archaeology of how the check ended up on the wrong side of the failure handling: https://gist.github.com/wallrj/0d5b62deb7646e8ecaaa1e7604d6c665
with claude fable-5
fix(e2e): retry a failed cert-manager issuance in seconds, not an hour (
Bump the test cert-manager to v1.21.3 and trust-manager to v0.26.0
Bump the test cert-manager to v1.21.3 and trust-manager to v0.26.0 (#…