Open Maxyme opened 6 years ago
By default the user defined account doesn't have access to the docker socket. It takes root level permissions or similar. So use sudo docker...
Get Outlook for iOShttps://aka.ms/o0ukef
From: Maxime Jacques notifications@github.com Sent: Thursday, November 23, 2017 6:55:13 AM To: Azure/ACS Cc: Subscribed Subject: [Azure/ACS] Connection refused with docker when tunneling into Azure Container Service master VM. (#92)
Is this a request for help?: No
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm) Swarm
What happened: Creation of a Azure Container Service with docker swarm mode. After SSH tunneling in the master and running docker ps:
channel 2: open failed: connect failed: Connection refused channel 2: open failed: connect failed: Connection refused error during connect: Get http://localhost:2375/v1.34/containers/json: EOF
It turns out that the docker containers are stopped on the master:
azureuser@swarm-master:~$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 39778bb2fb55 swarm:1.1.0 "/swarm manage --rep…" 4 minutes ago Exited (2) 3 minutes ago 0.0.0.0:2375->2375/tcp containers_swarm_1 541f68231443 progrium/consul "/bin/start -server …" 4 minutes ago Exited (255) 2 minutes ago 0.0.0.0:8300-8302->8300-8302/tcp
This was fixed by ssh'ing into the master, and running the following commands:
sudo service docker restart
docker start docker ps -q -l
What you expected to happen: SSH tunnel would work as expected without having to restart the stopped docker swarm manager on the master VM.
How to reproduce it (as minimally and precisely as possible): create an azure container service with 1 master and 1 vm in Swarm mode in a new ressource group.
Anything else we need to know:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2FACS%2Fissues%2F92&data=02%7C01%7Cjaquincy%40microsoft.com%7Cb3892924d4c34493d68208d5328233d7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636470457150537974&sdata=y8uwfHK2sb8qwgQxbpOOZETIyWTt4da8mhxnzmjqe6E%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUBiNFOhvtv36hUbOf_srf0cxSS6kwpLks5s5YdQgaJpZM4Qo30N&data=02%7C01%7Cjaquincy%40microsoft.com%7Cb3892924d4c34493d68208d5328233d7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636470457150537974&sdata=UBVQgQGoT%2FwZbtdc2z%2Fa%2B5mCHvTW30gOT8QTS1otXZ8%3D&reserved=0.
Opps seems I didn't read everything here.ignore my last comment
Thanks @Maxyme . I just had the same problem and I was trying to figure out why I couldn't connect from my local bash. Follow your steps and I can connect... however, to do this all the time as part of the bootstrapping process isn't good. It also seems that the swarm cluster hasn't been created.. Error response from daemon: No elected primary cluster manager
Same here, thanks @Maxyme . I was bitten by this as a brand new user of ACS and had no idea what was going on. Starting docker on the master did the trick. It's not a good first impression.
Is this a request for help?: No
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm) Swarm
What happened: Creation of a Azure Container Service with docker swarm mode. After SSH tunneling in the master and running docker ps:
It turns out that the docker containers are stopped on the master:
This was fixed by ssh'ing into the master, and running the following commands:
What you expected to happen: SSH tunnel would work as expected without having to restart the stopped docker swarm manager on the master VM.
How to reproduce it (as minimally and precisely as possible): create an azure container service with 1 master and 1 vm in Swarm mode in a new ressource group.
Anything else we need to know: