Search code examples
dockermesosmarathon

Mesos Slave Failed to create a containerizer


I want to Running Docker Containers on Marathon,

So I start the mesos-slave with --containerizers=docker,mesos

  /usr/local/Cellar/mesos/0.22.1/sbin/mesos-slave --master=zk://localhost:2181/mesos --log_dir=/Users/wangyao/WorkAndLog/mesos/log --work_dir=/Users/wangyao/WorkAndLog/mesos/work --containerizers=docker,mesos
  I1216 11:17:16.407368 2038878976 logging.cpp:172] INFO level logging started!
  I1216 11:17:16.407878 2038878976 main.cpp:156] Build: 2015-05-12 19:28:23 by brew
  I1216 11:17:16.407896 2038878976 main.cpp:158] Version: 0.22.1
  Failed to create a containerizer: Could not create DockerContainerizer: Failed to execute 'docker version': exited with status 1

it told me "Failed to execute 'docker version'" ,

and I execute "docker version"

wangyaos-MacBook-Pro-2:~ wangyao$ docker version  
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
Get http:///var/run/docker.sock/v1.19/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

My questions:

  1. what is 'docker version' use for?
  2. in order to start mesos with --containerizers=docker,mesos, do I need to install docker on my Os ?
  3. how to solve this issue "Failed to execute 'docker version'"?

Solution

  • The "Running Docker Containers on Marathon" uses Docker, which means you need to have a Linux host.

    If you are on Mac OS, you would need to install docker-toolbox in order to get a VirtualBox VM (Virtual Machine) on which you can have docker.

    docker version displays the version of the docker client and docker server: the server part fails, since it does not run on top of a Linux kernel (but a Mac one).