Step 5 of 6 · lab · 25 min
The site returns 500
From some moment on the hotel booking site answers its guests with error 500, and the nginx error.log is empty. Work out from the logs when the outage began and what caused it, write that down and bring the site back.
Situation
The hotel booking site is http://booking.lab.test/: nginx takes the requests and passes them to the lab-booking
application. Guests write that the site answers "500 Internal Server Error". The on-call engineer has already opened
the site's error.log — it is empty. The team lead asks for a short report: from what moment the site has been broken
and which line in the logs explains it. And the site has to be brought back.
The site logs are /var/log/nginx/booking.access.log and /var/log/nginx/booking.error.log; the application writes
to the systemd journal. Both are read with sudo.
Task
- Write to
~/incident.txt: - as the first line — the time the outage began, to the second (from then on the site returns 500), in the form the journal or access.log uses:2026-10-22 04:41:25or22/Oct/2026:04:41:25; - below it — the line from the application journal that shows the cause of the 500 answers. http://booking.lab.test/answers200again, and the page comes from thelab-bookingapplication.- The site answers
200after the application restarts too:sudo systemctl restart lab-booking.
Constraints
- Do not change the application code
/opt/booking/booking.py— look for the cause in its settings and fix it there. - The check itself restarts
lab-bookingand requests the site with a tag in the address: the answer must come from the application, not from nginx.
Visitors keep coming to the site while you investigate — new lines keep appearing in the logs.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 4-
http://booking.lab.test/ answers 200 — the page comes from the lab-booking application, its code is unchanged — not done yet
-
The first line of ~/incident.txt holds the time the outage began, to the second — from then on the site returns 500 — not done yet
-
~/incident.txt contains a line from the application journal that shows the cause of the 500 answers — not done yet
-
The site answers 200 after the application restarts too: sudo systemctl restart lab-booking — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 4-
http://booking.lab.test/ answers 200 — the page comes from the lab-booking application, its code is unchanged — not done yet
-
The first line of ~/incident.txt holds the time the outage began, to the second — from then on the site returns 500 — not done yet
-
~/incident.txt contains a line from the application journal that shows the cause of the 500 answers — not done yet
-
The site answers 200 after the application restarts too: sudo systemctl restart lab-booking — not done yet
Goals are checked on the machine after every command.