Skip to content
Lab 4 of 4

Up but Unreachable: Troubleshooting Layer by Layer

Rohit's riders cannot connect, and Arjun insists the API is up — he can see the process. Both are right. Work from nginx's evidence inward and outward, restore Kestrel's documented contract, and make the service reachable from the network again.
  • 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() failed line 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 ss and bind addresses)
  • You can edit files with sudo nano

Tasks

  1. 01Start from the evidence nginx recorded
  2. 02Find where the API really listens
  3. 03Restore the contract
  4. 04Make it reachable from the network