I'm pretty new to docker but for the life of me can not figure out what is going on here. The directory /export exist on each vm in the swarm but it still complains about not being able to find a suitable endpoint? The docker installation was done by following the directions for "Install using the repository" section from the docker website located here: https://docs.docker.com/engine/install/ubuntu/.
Steps to reproduce the error:
4 virtual machines running Ubuntu 20.04.5 LTS and Docker 20.10.18, build b4oc2f6
Create the swarm by running the following command on the manager:
root@dkrswpmgr:~# docker swarm init --advertise-addr 172.16.30.179
Then the docker swarm join command on each of the worker vm's
root@dockerswarmworkerthree:~# docker swarm join --token SWMTKN-1-147p8fclfc1lmlbefkowg2xms02drt9m4bffzt3eq08ox12v1f-c3ij2nnyqfo15bxl3fg9pzmcx 172.16.30.179:2377
Then to verify the swarm is correct run docker node ls on the manager node:
root@dkrswpmgr:~# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
bjrr8rqa55u686r0n6qw1yh37 dkrswnworkertwo Ready Active 20.10.14
slq6p97k49c3patnkqj459jbx * dkrswpmgr Ready Active Leader 20.10.14
z5e3wk78f75yg8t1u34tny0gf dkrswpworkerone Ready Active 20.10.14
3i92etwcwo45dgavoz2l4n1nk dkrswpworkerthree Ready Active 20.10.14
Now the swarm looks good and the directory /export exists on each machine, set the ACCESS and SECRET KEYS as docker external environment variables:
root@dkrswpmgr:~# echo "$(openssl rand -base64 21)" > ACCESS_KEY
root@dkrswpmgr:~# echo "$(openssl rand -base64 41)" > SECRET_KEY
root@dkrswpmgr:~# cat ACCESS_KEY | docker secret create access_key -
root@dkrswpmgr:~# cat SECRET_KEY | docker secret create secret_key -
Grab the MinIO distributed yaml file from here:
root@dkrswpmgr:~# wget https://git.shivering-isles.com/github-mirror/minio/minio/-/raw/df884210873b75116e98f0d7bb709e9a2e12ad29/docs/orchestration/docker-swarm/docker-compose-secrets.yaml
Deploy the service to the swarm:
root@dkrswpmgr:~# docker stack deploy -c docker-stack.yml MinIO
Creating network MinIO_minio_distributed
Creating service MinIO_minio3
Creating service MinIO_minio4
Creating service MinIO_minio1
Creating service MinIO_minio2
Look at the logs:
root@dockerswarmmanager:/home/e3rb0s# docker service logs minio_stack_minio3
minio_stack_minio3.1.d1hcolw4b3s6@dockerswarmworkerthree | ERROR Invalid command line arguments: no endpoint pointing to the local machine is found.
The error is the same for all vm's belonging to the swarm.