mesos slave failed to excute docker command - macos

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.

Related

failed to shutdown container in docker:

when im trying to build an image with command docker build im getting this error
im using windows docker desktop
The command '/bin/sh -c yarn install --production' returned a non-zero code: 4294967295: failed to shutdown container: container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)
how this error be resolved
This must be due to windows host failure on docker call when try to shut down the container
Try by restarting docker demon
sudo service docker restart
Check the status of the Docker containers:
docker ps -a
stop and remove it:
docker stop <container-id>
docker rm <container-id>
Then try by building the image again. If the problem still persists, consider upgrading to the latest version of Docker or clear docker cache or
docker system prune

Is the docker daemon running? Spring-boot java project on Ubuntu

I have Ubuntu 22.04,
I have Java Spring-boot project, I run Idea, then run docker-compose.yml and get this message:
Cannot connect to the docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running? (Details:[13] Permission denied)
What should I check?
You can take this perfect Tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04
The important section for you is: Step 2 — Executing the Docker Command Without Sudo (Optional)
Your Problem is that you try to use docker without sudo. You have no permission for that.

Docker Engine not running in Mac M1 series

Problem : I was trying to set up Docker on my Mac M1, docker engine was somehow keep running (it was in kind of hung state). When I tried running docker ps command, I used to get the error "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
Solution: In Docker Desktop go to settings and try these two steps:-
Clean/purge data
Reset to Factory defaults.
Doing this helped me to fix the issue.

webserver is shut down when Apache/AirFlow docker containers are started from local machine

I am trying to set up a development environment for Apache/AirFlow on MacBook with macOS 10.14.x.
I have installed docker, virtualbox and created virtual machine and created containers with web_server, worker, scheduler and redis, postgres.
I run :
docker-compose up -d
But, when I visited http://localhost:8080, I got:
This page isn’t working
localhost didn’t send any data.
ERR_EMPTY_RESPONSE
In the docker-compose log file, I found:
[mwebserver_1 [INFO] Parent changed, shutting down: <Worker 34>
[mwebserver_1 [INFO] Worker exiting (pid: 34)
[mwebserver_1 {{cli.py:815}} ERROR - No response from gunicorn master within 120 seconds
[mwebserver_1 {{cli.py:816}} ERROR - Shutting down webserver
I am not sure what the problem could be.
Any suggestions would be appreciated.
After start the docker container's.
Try to run docker exec -it NAME_OF_CONTAINER /bin/bash. After that you're gonna into container bash and you can run airflow webserver.

Docker on Win10 - is it possible to have multiple terminals?

I am new to Docker - installed DockerToolbox on Win10. And managed to run some basic docker examples. But I cannot seem to figure out how to access same container from multiple command line windows.
Quick online search suggested finding container ID (e.g. 2c7e29b9b666) via
docker ps
then running (I presume in new command window)
docker exec -it 2c7e29b9b666 bash
but that does not work in Win10.
Error message received is:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Edit: in the first window I started docker machine via:
docker-machine create --driver virtualbox tombox
and I can see 'tombox' in second window if I do:
docker-machine ls
Do I need to somehow reference 'tombox' when running docker commands in second window?

Resources