Skip to content

Final challenge: the shop is broken in three places

NinjaLesson 66 of 6615 min

The last Ninja challenge: three changes in one night broke the shop in three places. Find each fault from the outside in, and fix them all properly.

Three people made three changes last night, none of them told anyone, and this morning the shop doesn't work for anybody. Your job: make http://web/api/products answer from your laptop again.

There's more than one fault, and each one hides the next. The checklist fills in as you fix them, and only for real fixes: no turning the firewall off, no pinning things that should work by themselves.

Work from the outside in, the way you did when the website was down:

  1. What exactly fails? Read curl's error from your laptop. "No route to host", "timed out", "refused" and "502" each point somewhere different.
  2. Can I reach the machine? ping, and dig to compare what DNS says with what your laptop uses.
  3. On the server: the firewall (sudo ufw status), the services (systemctl status), and their logs (sudo journalctl -u).
  4. Prove it from your laptop, where the customers are.

This is the end of the Ninja level, so the hints start small. web, db and the router are pretend machines inside this page, and Reset puts the night's mistakes back if you want another go.

Your turn

Make http://web/api/products answer from your laptop. Fix every fault properly.

Done