Up but Unreachable: Troubleshooting Layer by Layer
- Intermediate
- 38 min
- Networking
- Troubleshooting
- nginx
- Kestrel
Overview
Rohit Bansal, the riders' team lead, messages at 9 a.m.: "The riders' app says cannot connect. Since this morning." Arjun replies: "The API is up. I can see the process."
They are both right, and that is the lesson. A service can be running and still be unreachable: listening on the wrong port, bound to the wrong address, or sitting behind a proxy that has the wrong idea about either. Arjun changed two things this morning "just to test something" and forgot both.
You will work it the way an on-call engineer does: start from the evidence the proxy recorded, find where the API really is, fix the side that broke Kestrel's documented contract (/opt/kestrel/BIBLE.md), and then test from the address other machines use — not from localhost, where everything always looks fine.
What you will learn
- Read a 502 and nginx's
connect() failedline as evidence about one specific hop - Separate "is it running?" (
pgrep) from "where does it listen?" (ss) - Fix configuration drift on the side that departed from the documented contract
- Test reachability from the network address, not from
localhost - Catch an nginx reload that silently failed
Before you start
- Addresses & Sockets (or comfort with
ssand bind addresses) - You can edit files with
sudo nano
Tasks
- 01Start from the evidence nginx recorded
- 02Find where the API really listens
- 03Restore the contract
- 04Make it reachable from the network