Docker daemon not starting after adding the -H flag

I’m trying to use Docker Swarm, to do that I need to start the Docker daemon with the -H flag on each node using this command:

docker -H tcp://0.0.0.0:2375 -d

When doing this on my node (Debian 8, Docker 1.6.0) the command never stops, even if it displays that the daemon has completed initialization.

  • Limitations of Docker Ambassador? Syslog on other Docker machine filling up quickly
  • docker -P not exposing ports of application started as argument
  • Proper handling of request_uri in double nginx reverse proxy?
  • How to use NPM Package Config Variables in Docker commands?
  • connected host has failed to respond when I run `docker run hello-world` in docker
  • Connect to WordPress Docker Container
  • The complete output:

    INFO[0000] +job init_networkdriver()                    
    INFO[0000] +job serveapi(tcp://0.0.0.0:2375)            
    INFO[0000] Listening for HTTP on tcp (0.0.0.0:2375)     
    INFO[0000] /!\ DON'T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING /!\ 
    INFO[0000] -job init_networkdriver() = OK (0)           
    WARN[0000] mountpoint for memory not found              
    INFO[0000] Loading containers: start.                   
    INFO[0000] Loading containers: done.                    
    INFO[0000] docker daemon: 1.6.0 4749651; execdriver: native-0.2; graphdriver: aufs 
    INFO[0000] +job acceptconnections()                     
    INFO[0000] -job acceptconnections() = OK (0)            
    INFO[0000] Daemon has completed initialization
    

    After this last line nothing happens and I’m not able to write another command.

    I also ran the command using screen to be able to run a command after the first one but I have a error message when running a Docker command:

    FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
    

    This command clearly states that the daemon didn’t start correctly. How could I have a Docker daemon that starts and ensures that remote API on Swarm Agents is available over TCP for the Swarm Manager?

  • Travis vs fastboot tests: spawn /bin/sh ENOENT
  • Boot2Docker starting Ubuntu image
  • Files in docker container disappear
  • How to reduce memory consumption of docker containers?
  • Docker on windows 10 can't startup after deleting MobyLinuxVM in Hyper-V manually
  • Why does Tensorflow have notebook encryption warnings when trying to run the standard tensorflow docker image without the bash command?
  • One Solution collect form web for “Docker daemon not starting after adding the -H flag”

    This commands states the client cannot talk to the docker daemon/engine/server. According to logs, your server is running.

    With only the -H tcp://0.0.0.0:2375, if you didn’t export DOCKER_HOST=127.0.0.1:2375, the docker client won’t be able to talk to the daemon. You have 2 ways to handle this :

    1. Exporting DOCKER_HOST

      # Exporting DOCKER_HOST when you want to talk to it
      $ export DOCKER_HOST=127.0.0.1:2375
      $ docker ps
      
    2. Or update your server options to also bind to the socket, like this

      # docker -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock -d
      $ docker ps
      
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.