📖 ~1 min read
Table of contents
Symptom & Impact
HTTPS and mTLS integrations fail due to expired or near-expired server certificates.
Environment & Reproduction
Often appears when renewal hooks fail or cert paths change unexpectedly.
openssl x509 -in /etc/ssl/certs/.pem -noout -dates
curl -I https://service.example
systemctl status
Root Cause Analysis
Renewal automation did not run or service did not reload updated certificate files.
Quick Triage
Measure expiry and confirm active cert served on network endpoint.
echo | openssl s_client -connect service.example:443 -servername service.example 2>/dev/null | openssl x509 -noout -dates
ls -l /etc/letsencrypt/live /etc/ssl/certs 2>/dev/null
systemctl list-timers | grep -E 'certbot|acme'
Step-by-Step Diagnosis
Inspect renewal logs, hook scripts, and service reload outcomes.
grep -RIn "renew|certificate|expired" /var/log 2>/dev/null | tail -n 40
certbot certificates 2>/dev/null || true
systemctl status certbot.timer 2>/dev/null || true

Solution – Primary Fix
Renew certificates, verify chain, and reload dependent services.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo certbot renew --force-renewal
sudo systemctl reload nginx 2>/dev/null || true
sudo systemctl reload apache2 2>/dev/null || true
openssl s_client -connect service.example:443 -servername service.example </dev/null | openssl x509 -noout -dates

Solution – Alternative Approaches
Use internal PKI automation for private services with shorter reload windows.
step ca renew /etc/ssl/certs/.pem /etc/ssl/private/.pem 2>/dev/null || true
systemctl reload
openssl x509 -in /etc/ssl/certs/.pem -noout -enddate
Verification & Acceptance Criteria
Endpoint serves non-expired cert and dependent clients connect successfully.
curl -Iv https://service.example
openssl s_client -connect service.example:443 -servername service.example </dev/null | openssl x509 -noout -dates
journalctl -u -n 50 --no-pager
Rollback Plan
Restore previous cert/key pair only if new chain is invalid.
cp /etc/ssl/certs/.pem /var/tmp/.pem.bak.$(date +%s)
cp /etc/ssl/private/.pem /var/tmp/.pem.bak.$(date +%s)
systemctl reload
Prevention & Hardening
Alert on expiry thresholds and test renewal hooks periodically.
systemctl list-timers | grep -E 'certbot|acme'
openssl x509 -in /etc/ssl/certs/.pem -noout -enddate
crontab -l
Related Errors & Cross-Refs
Related to clock drift, CA trust chain issues, and missing reload hooks.
Related tutorial: View the step-by-step tutorial for Debian 12.
View all Debian 12 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
TLS certificate lifecycle and Debian service integration references.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.