Troubleshooting Swarm Nodes
For the work we will be doing in this chapter, we will be using only a single-node swarm to host our services. Docker Swarm has been providing production-level environments for years now. However, this doesn't mean there will never be any issues with your environment, especially when you start hosting services in a multi-node swarm. If you need to troubleshoot any of the nodes running on your cluster, there are a number of steps you can take to make sure you are correcting any issues they may have:
- Reboot: Usually the easiest option is to either reboot or restart the node system to see whether this resolves the issues you may be experiencing.
- Demote the node: If the node is a manager on your cluster, try demoting the node using the
node demote
command:docker node demote <node_id>
If this node is the leader, it will allow one of the other manager nodes to become the leader of the swarm and hopefully resolve any issues you may be experiencing...