Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Connection refused with docker when tunneling into Azure Container Service master VM. #92

Open
Maxyme opened this issue Nov 23, 2017 · 4 comments

Comments

@Maxyme
Copy link

Maxyme commented Nov 23, 2017

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:

@JackQuincy
Copy link
Contributor

JackQuincy commented Nov 23, 2017 via email

@JackQuincy
Copy link
Contributor

Opps seems I didn't read everything here.ignore my last comment

@griffinbird
Copy link

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

@cowlike
Copy link

cowlike commented Dec 9, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants