LFCS Service Configuration Practice Question
A system administrator cannot restart a service because another unit 'stop' the request. The status message says 'Unit test.service is not running, but has pending stop job'. What is the most likely cause?
⚠ Common exam trap
Test-takers frequently confuse 'pending stop job' with a configuration error like masking or manual-stop refusal, when in fact it is a transient state caused by an incomplete stop operation.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A previous stop command is still being processed
The message 'Unit test.service is not running, but has pending stop job' indicates that systemd has queued a stop operation for the service, but the stop job has not yet completed. This typically happens when a previous 'systemctl stop' command was issued but the service's stop process (e.g., ExecStop script) is still running or hanging. Until that job finishes, any attempt to restart the service will be blocked because systemd serializes jobs for the same unit.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The service unit file has RefuseManualStop=yes
Why it's wrong here
RefuseManualStop=yes rejects manual stop commands with 'Operation refused', and does not create a pending stop job; the stem shows a stop job already queued. It is tempting because it concerns stop behaviour, and would be correct if systemctl stop returned a refusal rather than a pending job.
- ✗
The service has a dependency that is stopping
Why it's wrong here
A dependency stopping does not queue a stop job against test.service itself; the message names test.service as having the pending stop job, so the blocker is a job on that unit, not on a dependency. Dependency ordering is tempting because Requires/After relationships do delay restarts, and would apply if the status named the dependency.
- ✓
A previous stop command is still being processed
Why this is correct
A pending stop job means systemd has queued the stop operation but the unit has not yet reached an inactive state, so a restart request is refused until that job completes. This directly matches the "pending stop job" status, indicating the earlier stop command is still being processed.
- ✗
The service is masked
Why it's wrong here
Masking makes a unit impossible to start at all, returning 'Unit is masked' rather than a pending stop job; the stem's message shows a stop job queued, not a start refusal. Masking is tempting because it does block activation, and would be correct if systemctl start reported the unit masked.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 406-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.