A Linux system administrator has found that a web server service is failing to start automatically at system boot, which necessitates a manual start each time. After booting, systemctl status of the service reports a failed state, yet no errors are recorded in the standard service logs. What is the most likely cause of this issue?
There is an error with the ExecStart command that only manifests during the automated start sequence.
The web server service is missing a dependency on network-online.target in the unit file, causing it to start before the network stack is ready.
The server's network Time Protocol (NTP) configuration is incorrect, leading to time-related service start failures.
The primary configuration file for the service contains syntax errors that are only checked during automated starts.
The correct answer is that the service unit does not correctly specify a dependency on the network being fully ready, which is needed for it to start properly. Since the web server starts without errors manually post-boot, this suggests that the service itself is configured correctly, but requires the network to be operational, something network-online.target would ensure. Checking with systemctl is-enabled network-online.target would verify if the network-online.target is considered in the boot process, thereby affecting dependent services. Incorrect ExecStart paths or name resolution failures would generate identifiable error messages, and time-zone configurations typically do not affect service start processes in this manner.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is `network-online.target` in systemd?
Open an interactive chat with Bash
How can I check the service's unit file for dependencies?
Open an interactive chat with Bash
What is the significance of `systemctl is-enabled network-online.target`?