Error response from daemon This node is already part of a swarm Use docker swarm leave to leave this swarm and join another one

+2 votes

Hi Guys,

I am trying to add a worker node to the Docker swarm. But it is showing me the below error.

$ docker swarm join --token xxxxxxxxxxxxxxxxxxxxxxxxxxkliq8kq2ov-bf2inz84bhwbdzp9ddvxrbfoi 172.31.11.98:2377
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.

How to solve the error?

Dec 24, 2020 in Docker by akhtar
• 38,260 points
7,716 views

1 answer to this question.

0 votes

Hi@akhtar,

It is showing in the error that you have already used the node in your Docker swarm earlier. So if you want to add the node in another swarm, then you need to leave from the earlier swarm. You can use the below command to do the same.

$ docker swarm leave --force
Node left the swarm.

answered Dec 24, 2020 by MD
• 95,460 points

Related Questions In Docker

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
+2 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
3,925 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP