LFCS Operation of Running Systems Practice Question
Exhibit
Refer to the exhibit. $ sudo journalctl -u myapp.service --since "1 hour ago" -- Logs begin at Mon 2025-03-10 08:30:15 UTC, end at Mon 2025-03-10 12:45:22 UTC. -- Mar 10 11:30:17 server1 myapp[1234]: Starting application... Mar 10 11:30:18 server1 myapp[1234]: [ERROR] Failed to bind to port 8080: Address already in use Mar 10 11:30:18 server1 myapp[1234]: [INFO] Retrying in 5 seconds... Mar 10 11:30:23 server1 myapp[1234]: [ERROR] Failed to bind to port 8080: Address already in use Mar 10 11:30:23 server1 myapp[1234]: [INFO] Retrying in 10 seconds... Mar 10 11:30:33 server1 myapp[1234]: [ERROR] Failed to bind to port 8080: Address already in use Mar 10 11:30:33 server1 myapp[1234]: [FATAL] Exiting after repeated failures Mar 10 11:30:33 server1 systemd[1]: myapp.service: main process exited, code=exited, status=1/FAILURE Mar 10 11:30:33 server1 systemd[1]: myapp.service: Unit entered failed state.
Based on the journalctl output, what is the most likely cause of the service failure?
⚠ Common exam trap
Many exam-takers confuse a bind error with a configuration syntax error, but the specific 'Address already in use' message uniquely identifies a port conflict, not a parsing issue.
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
✓
Another process is already using port 8080.
The journalctl output shows a bind error on port 8080 with 'Address already in use'. This indicates that another process is already listening on that port, preventing the service from starting. In systemd, such a failure is logged with the specific errno EADDRINUSE, which directly points to a port conflict.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Another process is already using port 8080.
Why this is correct
The journal shows the service failed to bind its listening socket because port 8080 was already held by another process, producing an address-already-in-use error. This satisfies the stem by identifying port contention, not a configuration or permission fault, as the cause.
- ✗
The service configuration file has a syntax error.
Why it's wrong here
A syntax error in a configuration file causes the service to fail immediately and repeatedly at parse time, with the parser naming the offending line in the journal, not the runtime errors shown. It would be the cause where journalctl logs a parse failure before the unit ever starts.
- ✗
The system is out of memory.
Why it's wrong here
Memory exhaustion would surface as OOM-killer messages or allocation failures in the journal, not the specific error recorded in the stem. It tempts because OOM kills do stop services, and would be correct if the log showed the kernel terminating the process.
- ✗
The service is trying to write to a read-only filesystem.
Why it's wrong here
A read-only filesystem produces EROFS write errors naming the mount, which the stem's journal excerpt does not show. It tempts because failed writes do crash services, and would be correct if the log recorded write attempts rejected by a read-only mount.
Go deeper
Related to this question
About these practice questions
One of 406 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.