NinjaOps Fixes
/
Networking
Networking Fixes
9 troubleshooting guides — each with the error, why it happens, and copy-paste commands to fix it.
nginx 502 Bad Gateway: Finding the Real Culprit
— 502 means nginx reached for your upstream and got nothing usable back.
certbot Renewals Failing Silently Until Your Cert Expires
— Let's Encrypt certs last 90 days and certbot renews via a cron/systemd timer — until something small breaks it.
nginx 504 Gateway Timeout: Slow Upstream or Wrong Timeout
— 504 means nginx waited for your app and gave up.
curl: (6) Could Not Resolve Host — The Three DNS Layers
— Name resolution failed before any connection attempt.
"ERR_CONNECTION_REFUSED" — Nothing Is Listening on That Port
— Connection refused means the host was reachable but nothing accepted the connection on that port.
HTTP 429 Too Many Requests: Read the Headers, Then Back Off
— A 429 is an application-level 'slow down', not a network failure.
"Connection Reset by Peer" — Which End Reset You, and Why
— A reset (RST) means someone actively tore the connection down: the peer app, a middlebox, or the OS (port closed / queue full).
Weird Network Failures: TLS Hangs, Large Transfers Stall — Check MTU
— Small packets pass, large ones vanish: the classic MTU black hole.
CORS Error: "Blocked by CORS Policy" — The Server's Job, Not the Browser's
— CORS is the SERVER telling the browser who may call it.