Logo

dev-resources.site

for different kinds of informations.

Postmortem

Published at
8/23/2024
Categories
devops
softwaredevelopment
softwareengineering
webserver
Author
ebitech02
Author
9 person written this
ebitech02
open
Postmortem

Below is the postmortem for the web stack debugging #0 task—:

A laptop with bandaids :)

A summary of the issues I faced:

  • Duration of Issue: July 1, 2024, 12:00 PM - 2:30 PM WAT.
  • The Impact: The Apache web server inside the Docker container returned an empty response when querying the root of the server and not the page "Hello Holberton." It affected 75% of users who tried to access the application via the container.
  • The Cause: The Apache server was not set up with any ServerName directive and that was why it was not serving the content intended.

Here is the timeline -

  • 12:00 PM: An issue was detected when running curl 0:8080 returned "Empty reply from server" instead of the expected "Hello Holberton" message.
  • 12:10AM: I ran the Docker container and connected to the root of the server and noticed the problem.
  • 12:30 AM: I began examining Apache configuration inside the container. I thought there was a mistake in the configuration of the server..
  • 12:50 AM: I checked the status of the Apache service and discovered that the reason for the server not running was due to a missing 'ServerName' directive.
  • 1:30 AM: I added the line ServerName localhost to /etc/apache2.conf, fixing its configuration.
  • 2:00 PM: Ran the command for Apache service restart so that the configuration could take effect.
  • 2:10 PM: Testing and the result of curl 0:8080 was "Hello Holberton".
  • 2:30 PM: The content is rendering the intended content “Hello Holberton”.

The Root Cause and Resolution -

  • Root Cause: In this case, the ServerName directive was missing in the Apache configuration file /etc/apache2.conf inside a Docker container. When the ServerName directive is not present, Apache would fail to start properly for handling any incoming HTTP requests and will instead return an empty response while accessing the server.

  • Resolution: This was fixed by simply adding ServerName localhost to the Apache configuration file. This directive sets the name of the server, allowing Apache to start correctly. And with the configuration updated, the Apache service was restarted, and the server could finally present the "Hello Holberton" page as expected.

The Corrective Action and Preventive Measures -

  • Configuration Review: All necessary directives, such as ServerName, should be included in Apache configuration files. This is especially true for isolated environments like containers.

    • Automation: One can automate the Apache servers configured inside Docker containers to avoid hitting the same issue once more in the future.
    • Documentation: Include additional information in the internal documentation about why ServerName is necessary and how to troubleshoot common problems with Apache.
  • TODO List-:

  1. Configuration Check Addition: Create a script or process that checks for critical configuration settings like ServerName before starting Apache.
  2. Update Docker Image: Change the Docker image used for this project to default to the ServerName localhost directive.
  3. Doc Update: Update the documentation of team members with regard to common mistakes in Apache configurations inside containers.

Summary -

The malfunctioning of the Apache server in serving the "Hello Holberton" page was because the 'ServerName' directive was missing. It was fixed by updating Apache's configuration and restarting the service. Config management and automation will help prevent this kind of problem in the future.

webserver Article's
30 articles in total
Favicon
Nginx Simplified: Technical Insights with Real-World Analogies
Favicon
Need assistance to solve an issue
Favicon
Installing Nginx Web Server on Linux: A Step-by-Step Guide
Favicon
Step-by-Step Guide: Setting Up Apache2 and Deploying an HTML Template on Ubuntu (Using Vagrant on a Local Machine)
Favicon
Path-Based Reverse Proxying with Caddy
Favicon
Transform Your Business with Our ERP CRM Software in Kolkata
Favicon
What is a web server ?
Favicon
Postmortem
Favicon
gondola: Why not use a lightweight and simple YAML-based reverse proxy?
Favicon
Uptime Kuma: Uptime von Services beobachten und tracken 🔎
Favicon
Nginx-Proxy-Manager: Leichtgewichtiger Reverse-Proxy 🌍
Favicon
Nginx Proxy Manager: Lightweight reverse proxy 🌍
Favicon
Uptime Kuma: Monitor and track the uptime of services 🔎
Favicon
OpenResty: The Overpowered Web Server Used by 40M Websites (that people rarely talk about)
Favicon
Installing a WebServer on Win Server 2019 VM
Favicon
HOW TO SECURE A WINDOWS SERVER WITH IIS AND AZURE NETWORK SECURITY FEATURES
Favicon
Web Sunucuları: İnternetin Temel Taşları
Favicon
Installing a WebServer on Win Server 2019 VM
Favicon
Advantages of Outsourcing Server Management
Favicon
Deploying a web server on the Linux virtual machine
Favicon
Should I use Nginx or Apache Server?
Favicon
Running a Secure Web Server on AWS EC2
Favicon
Trending In NGINX: Top Trends
Favicon
🚀How TCP Servers Are Designed to Handle Multiple Requests
Favicon
Why did Cloudflare Build its Own Reverse Proxy? - Pingora vs NGINX
Favicon
Planning my Linux Homelab
Favicon
Building a Web Server in Go
Favicon
🚀Unlocking the Power of NGINX - A Web Server Marvel! 🚀
Favicon
Local machine as a web server without public IP using Cloudflare tunnel(part-1)
Favicon
How web technology works? - Part 02

Featured ones: