Mesos Slave Failed to create a containerizer - docker

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:
what is 'docker version' use for?
in order to start mesos with --containerizers=docker,mesos, do I need to install docker on my Os ?
how to solve this issue "Failed to execute 'docker version'"?

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).

Related

How to resolve error run gitlab ci runner (windows)

I am not able to run my python project test using gitlab ci. I am using gitlab public and runner run on my windows machine. I can run .gitlab-ci.yml using share runner on gitlab cicd but failed when I run my own runner.
Runner is installed and registered successful in my windows7 (executor-docker,no tag define, default image python:3.6)
I can see my windows runner run activated (green) in gitlab cicd and I disabled shared runners
My windows is already have docker installed (docker quickstart terminal)
When commit my jobs failed with the following error message
Running with gitlab-runner 13.0.1 (21cb397c)
on myhp7runner TKAFPyGA
Preparing the "docker" executor
00:10
ERROR: Removing network for build
ERROR: Preparation failed: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. (docker.go:1003:0s)
Will be retried in 3s ...
ERROR: Removing network for build
ERROR: Preparation failed: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. (docker.go:1003:0s)
from MINGW64 CLI
$ docker --version
Docker version 18.03.0-ce, build 0520e24302
$ net start com.docker.service
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
$ docker version
Client: 18.03.0-ce
API version: go1.9.4
Git comFri Mar 23 08:31:36 2018
OS/Arch: falsews/amd64
Orchestrator: swarm
Server: Docker Engine - Community
Engine: 19.03.5
API version: go1.12.12imum version 1.12)
Git commit: Wed Nov 13 07:28:45 2019
OS/Arch: false/amd64
containerd:al: v1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init: 0.18.0
GitCommit: fec3683
$ docker-machine env --shell cmd default
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://192.168.99.100:2376
SET DOCKER_CERT_PATH=C:\Users\dz-12NT\.docker\machine\machines\default
SET DOCKER_MACHINE_NAME=default
SET COMPOSE_CONVERT_WINDOWS_PATHS=true
REM Run this command to configure your shell:
REM #FOR /f "tokens=*" %i IN ('"C:\Program Files\Docker Toolbox\docker-machine.exe" env --shell cmd default') DO #%i
Not able to start docker service. How to resolve this issue. Thank you.

How do I install Docker using Chocolatey?

I ran
choco install docker-cli
choco install docker-machine
choco install docker-compose
choco install docker-desktop
I tried to test the installation according to the documentation, but got an error.
https://docs.docker.com/get-started/#test-docker-version
# docker --version
Docker version 19.03.1, build 74b1e89
# docker version
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:17:08 2019
OS/Arch: windows/amd64
Experimental: false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
# docker info
Client:
Debug Mode: false
Server:
ERROR: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
errors pretty printing info
I looked at this question but none of the answers were useful: docker cannot start on windows
I'm using Windows 10.
Reference: https://chocolatey.org/search?q=docker
I also downloaded an ran the installer directly from Docker.com.
https://hub.docker.com/editions/community/docker-ce-desktop-windows
It only said the existing installation is up to date and exited. There is no whale icon in the system tray.
From Task Manager > Performance > CPU showing virtualization is enabled:
There are definitely different ways to install Docker on Windows using Chocolatey, and rather than repeat all of the content here, I would recommend that you take a look at this blog post from Stefan Scherer:
https://stefanscherer.github.io/how-to-install-docker-the-chocolatey-way/
He works for Docker, and he is also a long term user of Chocolatey, and hopefully this blog post will help you get underway.
To summarize though, his TL/DR:
The best experience with Docker on a Windows 10 machine is using the Docker Desktop product. Try to grab an up-to-date Windows 10 Pro machine to be all set for it and then run
choco install docker-desktop
You'll have to start the program from the start-menu (at least once) to activate and configure the daemon.

How to figure out if docker master or agent running

How to figure out if docker master or agent running?
I do sudo docker version and this is what I get:
$ sudo docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.3.3
Git commit (client): a8a31ef/1.5.0
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.3.3
Git commit (server): a8a31ef/1.5.0
Is this a docker agent or a docker master? Is the master the daemon or the agent... or both?
Your output explicitly says:
Client version: 1.5.0
That is the version of your docker client - that command line tool - which you were using to get those information.
Server version: 1.5.0
That is the version of your docker server (or host, or daemon).
But what do you mean with agents? I do not know that term in the Docker context.
On a server you could start containers with docker run commands issued by the client. For a container you can get information about which image and tag is used by typing docker inspect --format='{{.Config.Image}}' <containerName>.
I just use docker ps and see if it works, I think this is the client, docker should be executed via systemctl

Docker daemon fails to start: inotify_add_watch: no such file or directory

I've installed lxc-docker-1.5.0 under minimal Debian Wheezy. I've also installed apparmor and had it enabled using parameters "apparmor=1 security=apparmor" in grub's linux default command line variable.
That's all configuration I've done so far. Since I don't have Internet access on this machine, I couldn't execute the get.docker.com script. Module aufs seems available.
When trying to use docker, I get:
# docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
There is no process "docker -d" running, and when trying to launch it:
# docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] WARNING: You are running linux kernel version 3.2.0-4-amd64, which might be unstable running docker. Please upgrade your kernell to 3.8.0.
INFO[0000] Listening for HTTP on unix(/var/run/docker.sock)
INFO[0000] +job init_networkdriver()
INFO[0000] -job init_networkdriver() = OK (0)
INFO[0000] WARNING: mountpoint for memory not found
INFO[0000] Loading containers: stat.
INFO[0000] Loading containers: done.
FATA[0000] inotify_add_watch: no such file or directory
The debug mode doesn't say more. Any suggestion would be appreciated, I couldn't find anybody having the inotify_add_watch message while trying to launch the docker daemon. Could it be because I'm running kernel 3.2?
Looks like your docker service is not running.
You can start it with:
service docker start
Seems that's the Docker's 1.5.0 causing the issue. Solved by installing version 1.4.1 instead.

Pushing files into private registry in Docker

I have setup the private registry using docker run -t -i -p 5000:5000 registry and it is accessible from 192.168.59.103:5000 (I am using boot2docker). Now I have already pulled an image tutum/tomcat and when I try to push the image (docker push 192.168.59.103:5000/tomcat) into the registry after tagging it as 192.168.59.103:5000/tomcat I face the following error as shown below --
FATA[0004] Error: v1 ping attempt failed with error: Get https://192.168.59.103:5000/v1/_ping: EOF. If this private regi
stry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.59.103:5000` to
the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag
; simply place the CA certificate at /etc/docker/certs.d/192.168.59.103:5000/ca.crt
FROM OTHER POSTS --
I have read some some posts about this where they state that adding DOCKER_OPTS would solve the issue and that it should be added into /etc/default/docker but In my system /etc/default doesn't contain a docker folder as shown from the command sudo ls /etc/default/ which provides the result as a sungle folder aufs.
Another post states that this can be thrawted by simply placing the certificate att /etc/docker/certs.d/192.168.59.103:5000/ca.crt but I am not able to move into the docker directory even when I use sudo as seen below -- for cd /etc/docker
-sh: cd: can't cd to /etc/docker
I have repeated the same process using the registry ip as 0.0.0.0:5000 inside docker (with the assumption the that $boot2docker ip should be used in the hosts machine and not within docker) -- But that still didn't fix the issue that I am facing.
Please do help me out to sort out this problem. I have added the system specification below --
System Specification:
Microsoft Windows 7 via. boot2docker (CLI version 1.5)
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
To use the --insecure-registry option, add it to the file /var/lib/boot2docker/profile inside the boot2docker VM. You can get into the VM with boot2docker ssh. The file contents should look like:
EXTRA_ARGS="--insecure-registry REGISTRY_IP:PORT"
You will then need to restart boot2docker (e.g. boot2docker restart).
I have no idea why you can't edit /etc/docker. The following works for me:
docker#boot2docker:~$ sudo ls /etc/docker
key.json

Resources