DNS Swarm agent not working on Azure

1- I created a new containerservice in azure.

2 – The creation was done following the portal step by step.

  • Docker Error bind: address already in use
  • Run script in background inside docker container from host
  • Docker-Machine stuck on creating default
  • Launching more than one container per instance on Elastic Beanstalk
  • How to restart docker container without log level?
  • Connectivity from microservice on host out of docker-compose network
  • 3 – I have not changed any configuration of any service, VM, balancing, master and agent.

    4 – I can connect with PuTTY normally.

    5 – I can open a tunnel by redirecting port 80 to port 80.

    Following this tutorial, I can put the container to run::

    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                NAMES
    ffe6a1c890e4        yeasy/simple-web    "/bin/sh -c 'pytho..."   31 minutes ago      Up 31 minutes>80/tcp   vibrant_morse

    If I access localhost from my browser I can reach port 80 of the container and see the identical “Real Visit Results” page of the tutorial.

    But in the tutorial it says that if I use load balancer’s DNS I should see the result, that’s my problem, I can not access the container through DNS, I only get timeout.

    Reinforcing, I created a container service and did not change any configuration, just entered with PuTTY and put the container to run.

  • Docker as replacement for standalone multihost webserver
  • How to create a superuser in Django with Linux shell script?
  • Connect to mongo docker with authentication from other docker (node)
  • Docker start a fresh instance(without the user data) of a stopped/running docker container.
  • Multiple WordPress sites with one shared DB using Docker
  • Can I put kubernetes in a docker container?
  • One Solution collect form web for “DNS Swarm agent not working on Azure”

    According to your description, it seems that you don’t set your DOCKER_HOST environment variable to the local port configured for the tunnel. When you ssh to your master VM, you need execute command below:

    export DOCKER_HOST=:2375

    Run the Docker commands that tunnel to the Docker Swarm cluster. For example:

    docker info

    If you don’t set the environment variable on the tunnel, the docker contanier is created on master VM, so you could not get the Web with agent Public IP.

    Also, you could not set environment variable, but you need to point to the host when you execute docker command. More information please refer to this link

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.