简体   繁体   中英

mesos slave failed to excute docker command

when i start a docker containner on mesos-slave

the mesos-slave log shows that:

I1223 15:38:40.822557 258486272 docker.cpp:761] Starting container 'ea1ed2fa-c2e3-469a-bcc4-142e0a6c624d' for task '2-1.2fb839ea-a948-11e5-9c42-2e7bf2aa25a6' (and executor '2-1.2fb839ea-a948-11e5-9c42-2e7bf2aa25a6') of framework '13165a00-8e58-4d80-b84d-fe4652022a3e-0000'
E1223 15:38:41.219044 254730240 slave.cpp:3342] Container 'ea1ed2fa-c2e3-469a-bcc4-142e0a6c624d' for executor '2-1.2fb839ea-a948-11e5-9c42-2e7bf2aa25a6' of framework '13165a00-8e58-4d80-b84d-fe4652022a3e-0000' failed to start: Failed to 'docker -H unix:///var/run/docker.sock pull python:3': exit status = exited with status 1 stderr = An error occurred trying to connect: Post https:///var/run/docker.sock/v1.19/images/create?fromImage=python%3A3: dial unix /var/run/docker.sock: no such file or directory

from that, i can see mesos-slave excute docker -H unix:///var/run/docker.sock pull python:3 to download images.

but I use Mac OSX, And the docker is running in the vm , So there is no docker.sock file in my slave but the vm.

How cuold i solve the issue on Mac OSX? please help me ,thanks!

I had this issue too. I was trying to run zookeeper, mesos, marathon, and friends all in one docker-compose file with my mac.

Trying to run things in marathon would cause the exact error that you got. I discovered that the docker daemon was not running on the slave. All I had to do was start it: docker exec <mesos-slave-container-name> sudo service docker start .

From then on, I was able to run docker containers using marathon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM