I deploy the azure for docker template and the manager node is part of an active swarm.
Actual behavior
docker node ls
Error response from daemon: This node is not a swarm manager. Use “docker swarm init” or “docker swarm join” to connect this node to swarm and try again.
swarm-manager000000:~$ docker-diagnose
Error: No such object: meta-azure
Additional Information
I had the same problem with the Azure Container Service template
Steps to reproduce the behavior
Deploy Docker Community Edition (CE) for Azure (stable) with default settings
To successfully deploy Docker 4 Azure you need to have existing Resource Group with Service Principal added as user in Resource Group Access control (IAM).
Steps needed for successful deployment:
Azure Active Directory -> App registrations -> New application registration, fill required fields = this will be your Service Principal application,
In newly created App go to Settings -> Password and add new password,
In Resource Groups add new resource group,
Go to newly created Resource Group -> Access control (IAM) and add previously created Service Principal as user with Owner role (maybe Contributor is enough),
Now you can deploy Docker 4 Azure template in created Resource Group and with created Service Principal.
Deployment should end with working Docker Swarm cluster with all nodes connected and Cloudstor plugin installed.
Above information exist in current documentation but to be honest it is not clear that if you want use existing Service Principal (generated in Azure portal, for example) you have to add it as owner to new Resource Group, where you want to deploy Docker for Azure template.
Anyway - I think that information will help someone else to not to waste a few hours.
I generated SP using helper image and saved credentials.
Then using that creating new Swarm: Tried both using WebUI portal link and az CLI
My service principal is listed in newly created group as Contributor. no issues there.
Note: I can create swarm fine when I use previous 17.12.0-ce template using swarm-create-success-17.12.0-ce.log (52.5 KB)
and it had cloudstore plugin installed and enabled
We’re run into a similar issue. We’re deploying Docker CE on ACS, using templates generated with acs-engine. Our deployment creates the cluster with Swarm as the orchestrator; we then deploy a number of Selenium containers to the swarm once it’s up and running. Selenium does it’s thing and then we delete the cluster and the resource group, always starting from scratch when we want to run new tests.
It is hit or miss. Sometimes everything works fine. Sometimes the Selenium containers fail to deploy and we get the “This node is not a swarm manager” error when we SSH into the master and attempt to troubleshoot. Our deployment includes a portainer container that we use for monitoring, which also fails to start in these situations.
We’ve noticed when this happens that the swarm container, and sometimes the network container, will have stopped on the master node. Restarting the docker service on the master resolves the issue and everything works after that. Our container restart policy is set to always, but the containers don’t ever restart if they do fail.