I am trying to create mysql cluster using docker swarm. I have 3 host servers and I want on each one of them to run only one docker mysql container. I was following the guide from here:
I followed the steps from the tutorial above and I have done this so far:
Installed and configured etcd on each host and its cluster health is ok
Installed docker on each servers and service is started
On one of the nodes initiated swarm mode and joined the other 2 nodes to the swarm. docker node ls shows all nodes and their state is ok
Created overlay network
Created 2 directories on each node that will be mounted to docker containers for permanent storage solution:
I try to create a service
docker service create
Now here problems happen. When i run the service create command all 3 containers never start and I get following errors in logs:
Jul 19 10:12:37 bs1 dockerd: time=“2017-07-19T10:12:37.740949992+02:00” level=error msg=“fatal task error” error=“task: non-zero exit (1)” module=“node/agent/taskmanager” node.id=pg5nwd5ws0eq38te3f0t1o27a service.id=ib6osl3b8k8hsh59p8i7irk77 task.id=ygee5jvdqtwq6sx20rt2rkgif
This problem happens even if i don’t use mount options and use ephemeral storage.
Can you give me some advice how to solve this problem? I need to have permanent storage for each container on each host to have a healthy and good working cluster.
Thank you in advance!