Conversation
When renewal fails before the order is loaded (e.g. the stored certificate or key pair can't be read), $domains is not yet set, so the "re-run ee site ssl-verify" hint printed an empty site name plus PHP undefined-variable warnings. Use $domain, which is always set and equals $domains[0].
authorize() swallowed the requestOrder() exception without logging it anywhere, so new-order failures (rate limits, rejected identifiers, account errors), which Let's Encrypt reports at order creation, still showed only the generic "local environment" warning. Append the exception message as the other SSL warnings now do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
SSL issuance/renewal failures showed operators only a generic
EE::warning(); the real exception went toEE::debug(), i.e. only intoee.log, never to stderr. Renewal runs unattended (cron) without--debug, so the actual ACME error (rate limit,rejectedIdentifier,badNonce, a finalize/storage failure, etc.) never reached the operator. Worse, the new-order catch inauthorize(), where Let's Encrypt rate limits and rejected identifiers surface on both issuance and renewal, didn't log the exception at all, so its "please check logs" pointed at nothing.Separately, both
executeRenewal()catch blocks emitted a hard-coded"Challenge Authorization failed. Check logs and check if your domain is pointed correctly to this server.". These catches fire for any exception/throwable (finalize failure, cert-store write error, etc.), so that line frequently misdirected operators toward a DNS/challenge problem that wasn't the cause.Fix
$e->getMessage()to the operator-facing warning incheck(), in bothexecuteRenewal()catches, and inauthorize()'s new-order catch (Let's Encrypt order request failed (<reason>). It seems you're …).executeRenewal()catches.executeRenewal()now always names the site (it used$domains[0], which is undefined when loading the stored cert/key fails, and printed an empty name plus PHP warnings).Notes
The exception text surfaces at warning level. ACME error strings contain no account-key material or JWS tokens (the ACME server never echoes those); the only incremental disclosure is absolute server paths on filesystem errors, acceptable for operator-run CLI tooling. (The pre-existing
EE::debug(print_r($e))inexecuteRenewal()is a separate problem: with PHP's defaultzend.exception_ignore_args=0it can write the domain private key toee.log; tracked as a follow-up.)Testing
Manual:
ee site create x.test --ssl=lenow showsLet's Encrypt order request failed ([rejectedIdentifier] … Cannot issue for "x.test" …); a renewal that fails after authorization (e.g. an unreadable domain key,ssl-renew --force) showsA critical error occurred during certificate renewal: <reason>with no "Challenge Authorization failed" line and the site name in the re-run hint.Tested on Ubuntu 26.04 with EasyEngine 4.12.0, including one real Let's Encrypt certificate for the renewal-failure case.