Docker Community Forums

Share and learn in the Docker community.

"This node is not a swarm manager" error straight after deploy


(Tamaspataky) #1

Expected behavior

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

  1. Deploy Docker Community Edition (CE) for Azure (stable) with default settings
  2. SSH onto the manager node and run docker node ls

(Deep Debroy) #2

@tamaspataky Can you execute:

docker logs $(docker ps -a | grep init-azure | cut -d' ' -f 1)

on all the manager nodes and post the output somewhere? That will help us identify what could be going wrong.


(Bmmathe) #3

I got the same error and it’s because the Service Principal account wasn’t configured correctly for the resource group.


(Sebastian) #4

I have hit the wall in the same place…

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:

  1. Azure Active Directory -> App registrations -> New application registration, fill required fields = this will be your Service Principal application,
  2. In newly created App go to Settings -> Password and add new password,
  3. In Resource Groups add new resource group,
  4. Go to newly created Resource Group -> Access control (IAM) and add previously created Service Principal as user with Owner role (maybe Contributor is enough),
  5. 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.


(Akomlik) #5

Deploying latest 17.12.1-ce fails with same errors for me.
swarm-create-fail-17.12.1-ce.log (10.2 KB)

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


(Msbecker1234) #6

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.

We’re kind of stumped at this point.


(Froy1234) #7

having the exact same issues. thanks for answers as i really appreciate. would really like to know more methods of how to deal with it. thanks!


(Imjosh2) #8

this is the problem. there is a workaround in the comments