Courseiva
mediumMultiple ChoiceObjective-mapped

XK0-006 Practice Question: Based on the exhibit, what is the most likely…

Exhibit

Refer to the exhibit.

```
$ cat /var/log/containers/web.log | grep "ERROR" | head -5
[2024-03-21 10:15:23] ERROR: Connection refused to database at 10.0.0.1:3306
[2024-03-21 10:15:24] ERROR: Connection refused to database at 10.0.0.1:3306
[2024-03-21 10:15:25] ERROR: Connection refused to database at 10.0.0.1:3306
[2024-03-21 10:15:26] ERROR: Connection refused to database at 10.0.0.1:3306
[2024-03-21 10:15:27] ERROR: Connection refused to database at 10.0.0.1:3306
```

Based on the exhibit, what is the most likely cause of the repeated connection refused errors?

⚠ Common exam trap

CompTIA often tests the distinction between 'connection refused' (service down) and 'connection timeout' (firewall blocking) — candidates confuse the two because both prevent access, but the TCP error message uniquely identifies the cause.

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

The database service is down.

The 'connection refused' error indicates that the client's TCP SYN packet reached the target host on port 3306, but the host actively rejected the connection because no process is listening on that port. This is the classic symptom of the MySQL/MariaDB database service being stopped or crashed, as the OS TCP stack sends an RST packet when a connection attempt hits a port with no listening socket.

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 DNS resolution for the database host fails.

    Why it's wrong here

    Would get unknown host.

  • A firewall is blocking port 3306.

    Why it's wrong here

    Firewall would drop, not refuse.

  • The database service is down.

    Why this is correct

    Connection refused typically means no process listening.

  • The database credentials are incorrect.

    Why it's wrong here

    Would get auth error.

Visual reference

Client Server SYN (seq=100) SYN-ACK (seq=200, ack=101) ACK (ack=201) Connection established — data transfer begins

About these practice questions

One of 979 original XK0-006 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.