Why nginx is not accessible from Swarm worker node.

0 votes

I've done the following:

Created a service container using below command

docker service create -p 8181:80 --name mysvc1 ngnix

Worker node and manager node is ready.

Service is running on manager

The container is running on the manager.

EC2 instances created

Security Group configured

Nginx service is accessible from manager node public IP.

If nginx is running on manager node. Why nginx is not accessible from Swarm worker node.

Jan 2 in Docker by Ali
• 10,440 points
281 views

1 answer to this question.

0 votes

Hey @Ali, your steps look perfectly fine but what I noticed is, you have created the service on the port 80 which is bound to 8181 port. Check if you've disabled the firewall on the worker node. 

To disable the firewall, execute the following command:

sudo service ufw stop

Also, in your security groups, just open all TCP connections to form a network between the worker and the master nodes.

answered Jan 2 by Vishnu

Related Questions In Docker

0 votes
2 answers

Why is docker image eating up my disk space that is not used by docker

Move the /var/llib/docker directory. Assuming the /root directory has enough ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 6,920 points
221 views
0 votes
1 answer

Docker Swarm- Build image only when stack deployed from manager node

Use docker build to build the image. ...READ MORE

answered Aug 24, 2018 in Docker by Nilesh
• 6,920 points
61 views
0 votes
1 answer
+1 vote
0 answers
0 votes
1 answer
0 votes
1 answer
+3 votes
3 answers

Not able to connect worker nodes to the swarm. Connection refused error

This definitely has to be a firewall issue. ...READ MORE

answered Apr 26 in Docker by Vaidya
4,973 views
+1 vote
4 answers

COPY is not working in Docker

I had the exact same issue. I ...READ MORE

answered May 6 in Docker by Emilia
2,239 views