{"action":"created","issue":{"url":"https://api.github.com/repos/docker/machine/issues/2366","labels_url":"https://api.github.com/repos/docker/machine/issues/2366/labels{/name}","comments_url":"https://api.github.com/repos/docker/machine/issues/2366/comments","events_url":"https://api.github.com/repos/docker/machine/issues/2366/events","html_url":"https://github.com/docker/machine/issues/2366","id":117992528,"number":2366,"title":"Certificates errors after creating a Swarm on DigitalOcean with Machine","user":{"login":"lucj","id":182406,"avatar_url":"https://avatars.githubusercontent.com/u/182406?v=3","gravatar_id":"","url":"https://api.github.com/users/lucj","html_url":"https://github.com/lucj","followers_url":"https://api.github.com/users/lucj/followers","following_url":"https://api.github.com/users/lucj/following{/other_user}","gists_url":"https://api.github.com/users/lucj/gists{/gist_id}","starred_url":"https://api.github.com/users/lucj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucj/subscriptions","organizations_url":"https://api.github.com/users/lucj/orgs","repos_url":"https://api.github.com/users/lucj/repos","events_url":"https://api.github.com/users/lucj/events{/privacy}","received_events_url":"https://api.github.com/users/lucj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T08:38:25Z","updated_at":"2015-11-20T18:43:32Z","closed_at":null,"body":"I use the following script to create a consul KV and a swarm (one master + one node)\r\n\r\n     # KV Store\r\n    docker-machine create \\\r\n    --driver digitalocean \\\r\n    --digitalocean-access-token ${TOKEN} \\\r\n    --digitalocean-region \"lon1\" \\\r\n    --digitalocean-size \"1gb\" \\\r\n    consul\r\n    eval \"$(docker-machine env consul)\"\r\n    docker run -d -p \"8500:8500\" -h \"consul\" progrium/consul -server -bootstrap\r\n    \r\n    sleep 5\r\n\r\n    # Swarm master\r\n    docker-machine create \\\r\n    --driver digitalocean \\\r\n    --digitalocean-access-token ${TOKEN} \\\r\n    --digitalocean-region \"lon1\" \\\r\n    --digitalocean-size \"1gb\" \\\r\n    --swarm --swarm-image=\"swarm\" --swarm-master \\\r\n    --swarm-discovery=\"consul://$(docker-machine ip consul):8500\" \\\r\n    --engine-opt=\"cluster-store=consul://$(docker-machine ip consul):8500\" \\\r\n    --engine-opt=\"cluster-advertise=eth1:2376\" \\\r\n    demo0\r\n    \r\n    sleep 5\r\n    \r\n    # Swarm node\r\n    docker-machine create \\\r\n    --driver digitalocean \\\r\n    --digitalocean-access-token ${TOKEN} \\\r\n    --digitalocean-region \"lon1\" \\\r\n    --digitalocean-size \"1gb\" \\\r\n    --swarm --swarm-image=\"swarm:1.0.0-rc2\" \\\r\n    --swarm-discovery=\"consul://$(docker-machine ip consul):8500\" \\\r\n    --engine-opt=\"cluster-store=consul://$(docker-machine ip consul):8500\" \\\r\n    --engine-opt=\"cluster-advertise=eth1:2376\" \\\r\n    demo1\r\n\r\nOutput while creating demo0 swarm master (same error when creating demo1 swarm node)\r\n\r\n    Creating machine...\r\n    (demo1) OUT | Creating SSH key...\r\n    (demo1) OUT | Creating Digital Ocean droplet...\r\n    (demo1) OUT | Waiting for IP address to be assigned to the Droplet...\r\n    Waiting for machine to be running, this may take a few minutes...\r\n    Machine is running, waiting for SSH to be available...\r\n    Detecting operating system of created instance...\r\n    Detecting the provisioner...\r\n    Provisioning created instance...\r\n    Copying certs to the local machine directory...\r\n    Copying certs to the remote machine...\r\n    Setting Docker configuration on the remote daemon...\r\n    Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening:     Maximum number of retries (5) exceeded\r\n\r\nI can ssh to the demo0 and demo1 nodes but got the following error when trying to switch to the context of those Docker hosts\r\n\r\n    $> eval $(docker-machine env demo0)\r\n    Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host \"46.101.72.202:2376\": dial tcp 46.101.72.202:2376: getsockopt: connection refused\r\n    You can attempt to regenerate them using 'docker-machine regenerate-certs name'.\r\n    Be advised that this will trigger a Docker daemon restart which will stop running containers.\r\n\r\nI tried several times and got the same results each time.\r\n\r\nMy docker-machine version:\r\n\r\n    $ docker-machine -v\r\n    docker-machine version 0.5.1 (7e8e38e)"},"comment":{"url":"https://api.github.com/repos/docker/machine/issues/comments/158487308","html_url":"https://github.com/docker/machine/issues/2366#issuecomment-158487308","issue_url":"https://api.github.com/repos/docker/machine/issues/2366","id":158487308,"user":{"login":"lucj","id":182406,"avatar_url":"https://avatars.githubusercontent.com/u/182406?v=3","gravatar_id":"","url":"https://api.github.com/users/lucj","html_url":"https://github.com/lucj","followers_url":"https://api.github.com/users/lucj/followers","following_url":"https://api.github.com/users/lucj/following{/other_user}","gists_url":"https://api.github.com/users/lucj/gists{/gist_id}","starred_url":"https://api.github.com/users/lucj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucj/subscriptions","organizations_url":"https://api.github.com/users/lucj/orgs","repos_url":"https://api.github.com/users/lucj/repos","events_url":"https://api.github.com/users/lucj/events{/privacy}","received_events_url":"https://api.github.com/users/lucj/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T18:43:32Z","updated_at":"2015-11-20T18:43:32Z","body":"When ssh to the host, the docker daemon is not running.\r\n\r\n    $> dm ssh demo0\r\n    Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-57-generic x86_64)\r\n     * Documentation:  https://help.ubuntu.com/\r\n    \r\n      System information as of Fri Nov 20 13:40:59 EST 2015\r\n    \r\n      System load:  0.59              Processes:              71\r\n      Usage of /:   5.3% of 29.40GB   Users logged in:        0\r\n      Memory usage: 6%                IP address for eth0:    178.62.106.249\r\n      Swap usage:   0%                IP address for docker0: 172.17.0.1\r\n\r\n      Graph this data and manage this system at:\r\n        https://landscape.canonical.com/\r\n\r\n    root@demo0:~# docker ps\r\n    Cannot connect to the Docker daemon. Is the docker daemon running on this host?\r\n"}}