인셔셔RSS 관심 있는 블로그, 뉴스, 기술 정보를 효율적으로 추적하고 읽으세요
원문 읽기 InertiaRSS에서 열기

추천 피드

小众软件
小众软件
博客园 - 叶小钗
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
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

이것은 예상보다 오래 걸린 디버깅이었습니다.

설정

Caddy를 systemd 기반 리눅스 머신에서 리버스 프록시로 실행 중입니다. ACME를 통해 인증서 갱신 중입니다. 로그에는 모든 것이 정상적으로 보입니다. 그런데 어느 날 인증서가 만료되었고, 두 날 동안 누구도 눈치채지 못했습니다.

원인

systemd-resolved는 upstream resolver 상황에 따라 특정 DNS 쿼리에 대해 SERVFAIL을 반환하는 동작을 가지고 있습니다. 일관성이 없습니다. 일부 영역은 잘 해결되지만, 일부는 침묵으로 실패합니다. Caddy의 ACME 클라이언트가 챌린지 요청을 보내면, systemd-resolved는 실패를 보고하며, 갱신이 그냥 일어나지 않습니다.

이것이 귀찮은 것은 systemd-resolve --status에서 아무것도 잘못된 것처럼 보이지 않는다는 점입니다.dig는 8.8.8.8에 대해 잘 작동할 수 있습니다. 스타브 리졸버가 사용자의 애플리케이션을 속이고 있으며, 유용한 곳에 로그를 남기지 않습니다.

수정 방법

이를 처리하는 세 가지 방법:

1. 스타브 리졸버를 무시합니다

Caddy(또는 Go의 네트워크 스택 일반)를 공개 리졸버에 직접 지정합니다. Caddyfile에서:

{
  servers :443 {
    dns resolver 1.1.1.1
  }
}

전체 화면 모드로 전환 전체 화면 모드 종료

또는 GODEBUG=netdns=go를 설정하여 Go 리졸버를 강제하고 시스템 리졸버 구성을 신뢰하지 않도록 하세요.

2. systemd-resolved를 재시작하세요.

systemctl restart systemd-resolved는 그것이 모은 손상된 상태를 지웁니다. 이것은 일시적인 해결책입니다 — 다시 마주하게 될 것입니다.

영구적으로는 /etc/resolv.conf를 확인하고 모든 것에 대해 stub 리졸버에 의존하지 않고 있는지 확인하세요.

3. DNS-over-HTTPS를 사용하세요.

해결된 상태로 남아서 더 취약하지 않게 하려면, 평범한 UDP 대신 DoH 업스트림을 사용하도록 구성하세요. SERVFAIL 상황은 해결하지 못하지만, MITM 문제의 한 클래스를 피할 수 있습니다.

알아두어야 할 증상

특정 증상: Caddy 로그는 갱신 실패라고 합니다만, 명백한 이유를 제공하지 않습니다.caddy list은 인증서가 곧 만료될 것임을 보여줍니다. 나머지 모든 것이 작동 중입니다. 브라우저는 인증서 만료 경고를 캐시하기 때문에 사용자들이 불평을 멈추지만—그리고 그것이 월요일 아침에 당신의 문제가 됩니다.

결론

Caddy를 systemd-resolved에서 실행 중이고 인증서가 예기치 않게 만료되고 있다면, 다른 것을 확인하기 전에 스텀프 리졸버를 확인하세요. "DNS가 작동하고 있기 때문에"라는 이유로 숨겨진 종류의 실패입니다.


후원하지 않음. 그냥 오후를 낭비한 것뿐.