2

I have 1 manager node (swarm-manager) and two worker nodes (swarm-worker01 and swarm-worker02). I typed the command docker node promote swarm-worker01 it gave me this output:

 Node swarm-worker01 promoted to a manager in the swarm.

But docker node ls doesn't say anything about swarm-worker01 being a manager:

ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
oaquxnmku3s4uhrcp29ijx7rn *   swarm-manager       Ready               Active              Leader              19.03.4
xfwywb5wu550lme0epcexrgu1     swarm-worker01      Ready               Active                                  19.03.4
afyhz03k7uoejnm5dlht98ip5     swarm-worker02      Ready               Active                                  19.03.4

I if try to promote the node again I get the message:

Node xfwywb5wu550lme0epcexrgu1 is already a manager.

My API version is 1.40

Is there anything I'm missing?

Yashar
  • 2,455
  • 3
  • 25
  • 31

2 Answers2

2

I had the same problem and resolved the issue by making sure that the worker node being promoted has the port 2377 open, which is required for a manager to function.

Chakri
  • 31
  • 6
  • Expanding Chakri 's answer, since docker communicates using HTTP if you promote a worker node to a manager before adding the 2377/tcp port to the firewall-cmd the node's state will not be up-to-date as a manager it will still show to (docker node ls) with its previous status. However, to the docker swarm, that particular node is already a manager. Dues, the conflicting messages you have, @Yashar – Vasil Mar 25 '22 at 09:14
1

Thanks to @chakri Here are all ports listet: https://docs.docker.com/engine/swarm/swarm-tutorial/#open-protocols-and-ports-between-the-hosts

So basicly get sure that each node can handle this:

  • TCP port 2377 for cluster management communications
  • TCP and UDP port 7946 for communication among nodes
  • UDP port 4789 for overlay network traffic