简体   繁体   中英

Ports to open for docker swarm(cluster)

Created 6 EC2 instances in Central region.

Below security group(only) is applied for each EC2 instance:

在此处输入图片说明

在此处输入图片说明

Out of 6 nodes, 3 managers & 3 worker nodes, in docker swarm


docker version 19.03.1

EC2 instance( mgr1 ) is successfully included in swarm(cluster) using command:

 docker swarm init --advertise-addr 172.31.4.156:2377 --listen-addr 172.31.4.156:2377

On mgr2 , after running below command:

ubuntu@mgr2:~$ docker swarm join --token SWMTKN-1-2emfdddddddddddddddddue2y75runbithrtcadjakh8ttgt 172.31.4.156:2377 --advertise-addr 172.31.27.84:2377 --listen-addr 172.31.27.84:2377

gives below error:

Error response from daemon: Timeout was reached before node joined. The attempt to join the swarm will continue in the background. Use the "docker info" command to see the current swarm status of your node.
ubuntu@mgr2:~$ 

On checking the cluster status on mgr2 , below is the ouput:

ubuntu@mgr2:~$ docker node ls

gives

Error response from daemon: This node is not a swarm manager.Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

1) What port numbers should be open for all 6 EC2 nodes? inbound & outbound

2) Is communication TCP based? for working of docker swarm...

需要打开的TCP和UDP端口docker swarm被记录在这里

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM