Card 08/ 09

ExerciseDifficulty: Advanced1 min

Practice: Five Symptoms, Five Layers

A timeout, a refused connection, a certificate error, an NXDOMAIN and a 503; name the layer and the first tool for each.

Naming the layer from the symptom, and the tool that tests it, is the core of debugging by layer. A service is called from a laptop, and five different days bring five different errors.

  1. curl: (28) Failed to connect to api.example.com port 443: Connection timed out
  2. curl: (7) Failed to connect to api.example.com port 443: Connection refused
  3. curl: (60) SSL certificate problem: certificate has expired
  4. dig api.example.com returns status NXDOMAIN
  5. The response is 503 Service Unavailable from the load balancer

For each, name the layer that failed and the first tool to run next.

Show the answers
Each symptom, the layer it points to, and the first tool
SymptomLayerFirst toolWhy
Timed out3 or a firewall at 4traceroute, then the security group rulesNo reply at all: a route or a filter dropped the SYN
Refused4, the transportnc -vz, then ss -tlnp on the hostThe host replied with a reset: nothing listens on 443
Certificate expiredTLSopenssl s_client -connect api.example.com:443TCP worked; the certificate's dates do not include today
NXDOMAINApplication, DNSdig @ the authoritative serverThe name does not exist, in the zone or in a typo
503 from the load balancer7, behind the proxycurl -v, then the target group's healthEvery layer to the load balancer worked; it has no healthy target

The order of the first four follows the order of setup: a symptom later in the list proves every step before it succeeded.