CompTIA Server+ (SK0-005)TroubleshootingMedium
A web server running Apache is suddenly returning '503 Service Unavailable' errors to all clients. The server itself is pingable, and SSH access is working. Upon checking the Apache service status, it shows as 'running'. However, inspecting the Apache error logs reveals a recurring message: 'AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND' failed to start due to port 80 already in use.' Which of the following is the MOST likely cause?
- AInsufficient RAM is preventing Apache from binding to the port.
- BAnother process is already listening on port 80.
- CThe Apache configuration file has syntax errors.
- DThe server's network firewall is blocking port 80.
Show answer & explanationAnswer & explanation
Correct answer: B. Another process is already listening on port 80.
The error message 'port 80 already in use' explicitly states that another process has already bound to the standard HTTP port. This prevents Apache from starting correctly on that port, even if the service status shows 'running' (it might be running but not functional on the intended port), leading to 503 errors.
Why the other options are wrong
- A. Insufficient RAM would likely cause Apache to crash, fail to start with a memory allocation error, or perform extremely slowly, not specifically report 'port 80 already in use'.
- C. Syntax errors in the configuration file would typically prevent Apache from starting at all, or show a different error message related to parsing the config.
- D. If the firewall was blocking port 80, SSH wouldn't work (if on a standard port) or clients would get connection refused, not a 503 from the server.
Port Conflict
A situation where two or more applications attempt to listen on the same network port simultaneously, causing one or more of them to fail to start or operate correctly.
- Only one process can bind to a specific port at a time.
- Common in web servers (port 80, 443) if multiple are installed.
- Can be diagnosed by checking error logs and listing open ports.
Memory trick: 503 says 'unavailable', log says 'port in use', another app's the culprit, no excuse!