慣性聚合 関心のあるブログ、ニュース、テクノロジーを効率的に追跡
原文を読む 慣性聚合で開く

おすすめ購読元

小众软件
小众软件
博客园 - 叶小钗
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
T
Tailwind CSS Blog
Jina AI
Jina AI
量子位
Stack Overflow Blog
Stack Overflow Blog
人人都是产品经理
人人都是产品经理
J
Java Code Geeks
V
Visual Studio Blog
月光博客
月光博客

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
Caddyの証明書が有効期限切れになったのは、systemd-resolvedが選択的に嘘をついていたからです
Schiff Heiml · 2026-05-28 · via DEV Community
Cover image for A Caddy Cert Expired Because systemd-resolved Was Selectively Lying

Schiff Heimlich

これは、期待通りにデバッグするのに時間がかかったものです

設定

systemdベースのLinuxマシン上でCaddyをリバースプロキシとして実行しています。ACMEを通じて証明書の更新を行っています。ログには何も問題がないように見えます。しかし、ある日証明書が有効期限切れになり、2日間誰も気づかなかったのです

原因

systemd-resolvedは、上流のリゾルバーの状況によって特定のDNSクエリに対してSERVFAILを返す動作があります。一貫性がありません。いくつかのゾーンは正常に解決しますが、いくつかは静かに失敗します。CaddyのACMEクライアントが挑戦リクエストを送信し、systemd-resolvedは失敗を報告し、そして更新がただ起こりません...

これが面倒なのは、systemd-resolve --statusに何も問題がないように見えるからです。dig は 8.8.8.8 に対してうまくいくかもしれません。スタブリゾルバーがあなたのアプリケーションに対して嘘をついており、それをどこか役立つ場所に記録していない

。 修正策

それを処理する三つの方法:

1. スタブリゾルバーをバイパスする

Caddy(またはGoのnetスタック全体)を直接公共のリゾルバーにポイント。あなたのCaddyfile:

{
  servers :443 {
    dns resolver 1.1.1.1
  }
}

フルスクリーンモードに入る フルスクリーンモードを出る

またはGODEBUG=netdns=goを設定して、システムリゾルバーの設定ではなくGoリゾルバーを強制します

2. systemd-resolvedを再起動します

systemctl restart systemd-resolvedは、蓄積した破損状態をクリアします。これは一時的な解決策です — また同じ問題に直面する可能性があります

より永続的な解決策として、/etc/resolv.confを確認し、すべてのことをスタブリゾルバーに依存していないことを確認してください

3. DNS-over-HTTPSを使用します

解決済みのままでも、より頑健にするには、平文UDPの代わりにDoH上流を使用するように設定します。SERVFAILのケースを解決しませんが、MITM問題のクラスを回避します.

知っておくべき症状

具体的な症状:Caddyのログには更新が失敗したと記録されますが、明確な理由は示しません。caddy list は証明書がすぐに有効期限切れになると表示します。他のすべては正常に動作しています。ブラウザは証明書の有効期限切れの警告をキャッシュするので、ユーザーは苦情を止める——そして月曜日の朝にあなたの問題になります.

まとめ

Caddyをsystemd-resolvedで実行していて、証明書が予期せず有効期限切れになっている場合、他の何かを確認する前にスタブリゾルバーを確認してください。DNSが動作しているという理由で、この種の失敗は明らかに見え隠れしているタイプです。


スポンサーではありません。ただ、午後を無駄に費やしただけのものです。