Swarm Init & Listen Addr — DCA Practice Question
A representative Docker Certified Associate (DCA) exam question on Swarm Init & Listen Addr. Work through it below, then read why each option is right or wrong.
This question is part of the free Docker Certified Associate practice test.
Short answer
The correct answer is C. 0.0.0.0:2377, the documented default listen address, so it accepts connections on all interfaces on port 2377.
C is correct: the swarm init reference lists 0.0.0.0:2377 as the default for --listen-addr. A is wrong because port 7946 is used for node discovery, not for manager API traffic, and the listen address is not derived from the advertised one. B is wrong because the default is 0.0.0.0, not the loopback address, so remote nodes can connect. D is wrong because port 4789 carries overlay network traffic, not swarm management traffic.
The Question
An administrator runs docker swarm init --advertise-addr 10.0.0.5 and passes no --listen-addr flag. On which address and port does the new manager listen for swarm management traffic?
Why C is correct
C is correct: the swarm init reference lists 0.0.0.0:2377 as the default for --listen-addr. A is wrong because port 7946 is used for node discovery, not for manager API traffic, and the listen address is not derived from the advertised one. B is wrong because the default is 0.0.0.0, not the loopback address, so remote nodes can connect. D is wrong because port 4789 carries overlay network traffic, not swarm management traffic.
Why the other options are wrong
Option A does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.
Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.
Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.
Key idea: Swarm Init & Listen Addr
C is correct: the swarm init reference lists 0.0.0.0:2377 as the default for --listen-addr. A is wrong because port 7946 is used for node discovery, not for manager API traffic, and the listen address is not derived from the advertised one. B is wrong because the default is 0.0.0.0, not the loopback address, so remote nodes can connect. D is wrong because port 4789 carries overlay network traffic, not swarm management traffic. On the DCA exam, questions in the "Orchestration" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.
Ready to see how you'd score?
Take the free practice quiz and find out which Docker Certified Associate domains you need to focus on. No signup required.
Practice 5 similar questions
Same cert, same or adjacent domain. Use these after reviewing the explanation.
Related Docker Certified Associate Practice Questions
Official sources used
Verify program and exam details at the source before scheduling.