Docker daemon not running: error during connect: open //./pipe/docker_engine - windows

Error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.project%3Dkafka-waffle-stack%22%3Atrue%7D%7D": open //./pipe/docker_engine: The system cannot find the file specified
How can I fix this issue and get the docker-compose command to work?
I am trying to run a docker-compose command, but I am receiving the above error message. The error message seems to indicate that the Docker daemon is not running. I have tried starting the Docker daemon by running the command "dockerd" in the command prompt, but the issue persists.

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

exit status 1: error during connect: This error may indicate that the docker daemon is not running

I went through each step and followed the documentation here https://minikube.sigs.k8s.io/docs/drivers/docker/
When I try to run
minikube start --driver=docker
I get this error
X Exiting due to PROVIDER_DOCKER_NOT_RUNNING: "docker version --format -" exit status 1: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
* Suggestion: Start the Docker service
* Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/
The documentation it references is the same one I used to set everything up to begin with. I also tried switching daemon using the command "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon
that didn't work and I tried reset the docker settings to default and I'm still getting this error.

ddev permissions issue - cannot stop, rm, or kill project

About 99% of the time when I try to stop or rm a ddev project I get a 'permission denied' error, and then have to try a lot of different means to get ddev back to a healthy state so I can start working again. Then it happens all over again the next time I come to work on the project.
Can anyone suggest a) the quickest means to break out of this when I am unable to stop a docker container or ddev project b) a means to work out why it keeps happening and fix it?
To mitigate this I have tried:
ddev stop
ddev rm -a
ddev rm
ddev stop
Docker stop
Updating ddev
Upgrading docker
Restarting the machine (occasionally works)
Using the docker kill command
I am working on a linux machine Ubuntu 18.04
Ddev version is v1.8.0
Docker is 18.09.6, build 481bc77
Thank you!!
I would expect to be able to stop and start projects easily but seem to have been getting a permissions error about 99% of the time. I have not identified why it sometimes on the rare occasion works fine.
Stopping ddev-lpntheme-dba ... error
Stopping ddev-lpntheme-web ... error
Stopping ddev-lpntheme-db ... error
ERROR: for ddev-lpntheme-web cannot stop container: 761c2f876230df13267d3d2a7c5d92c869d796a41f1b45cf1c9831ee6673740f: Cannot kill container 761c2f876230df13267d3d2a7c5d92c869d796a41f1b45cf1c9831ee6673740f: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown
ERROR: for ddev-lpntheme-dba cannot stop container: e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf: Cannot kill container e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown
Removing container: ddev-lpntheme-dba
Failed to remove project lpntheme:
could not remove container ddev-lpntheme-dba: API error (500): Could not kill running container e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf, cannot remove - Cannot kill container e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown
I've also managed to completely break the Docker daemon in the past trying to resolve this problem. (I was following this and didn't really know what I was doing How to stop running Container, if error response from daemon is: Cannot Kill Container [...] permission denied?)
Any help greatly appreciated!
More info from 7/6/19
crispin#sonic:~/dockerfolder/ToolLibraryProject$ ddev start
Starting ToolLibraryProject...
Recreating ddev-ssh-agent ... done
ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys.
Running Command Command=ip address show dev docker0
Creating volume "ToolLibraryProject-mariadb" with default driver
Creating ddev-ToolLibraryProject-db ... done
Creating ddev-ToolLibraryProject-web ... done
Creating ddev-ToolLibraryProject-dba ... done
Recreating ddev-router ... done
Ensuring write permissions for ToolLibraryProject
Successfully started ToolLibraryProject
Project can be reached at https://ToolLibraryProject.ddev.local, http://ToolLibraryProject.ddev.local, https://127.0.0.1:32771, http://127.0.0.1:32772
crispin#sonic:~/dockerfolder/ToolLibraryProject$ ls
composer.json config LICENSE phpunit.xml.dist scripts web
composer.lock drush load.environment.php README.md vendor
crispin#sonic:~/dockerfolder/ToolLibraryProject$ ls
composer.json config LICENSE phpunit.xml.dist scripts web
composer.lock drush load.environment.php README.md vendor
crispin#sonic:~/dockerfolder/ToolLibraryProject$
crispin#sonic:~/dockerfolder/ToolLibraryProject$ ddev stop
Stopping ddev-ToolLibraryProject-web ... error
Stopping ddev-ToolLibraryProject-dba ... error
Stopping ddev-ToolLibraryProject-db ... error
ERROR: for ddev-ToolLibraryProject-web cannot stop container: 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3: Cannot kill container 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown
ERROR: for ddev-ToolLibraryProject-dba cannot stop container: cc2209064e0103fdab638445aeac2206217c83a17a7b97eea2216440bb5bb4e2: Cannot kill container cc2209064e0103fdab638445aeac2206217c83a17a7b97eea2216440bb5bb4e2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown
Removing container: ddev-ToolLibraryProject-web
Failed to remove project ToolLibraryProject:
could not remove container ddev-ToolLibraryProject-web: API error (500): Could not kill running container 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3, cannot remove - Cannot kill container 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown
And with docker logs ToolLibraryProject I get Error: No such container: ToolLibraryProject
Regarding file system I hope this makes sense:
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

"OCI runtime create failed " issue running script on MacOS using Docker host

I'm trying to run pishrink on MacOS using a Docker host, as explained here. The pishrink script shrinks the size of an .img so it's quicker to burn onto an SD card.
I have Docker Desktop running, and I've add the repo to the top-level in my file system (/pishrink) and and running the following command:
docker-compose run pishrink /pishrink/pishrink.sh /pishrink/big-image.img /pishrink/small-image.img
When I do, I get the following error:
Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/pishrink/pishrink.sh\": permission denied": unknown
Can someone help me debug this issue? I'm relatively new to using Docker so I might be making some simple + fundamental mistakes.
I was able to fix this with the following command, using sudo as suggested:
sudo docker-compose run pishrink /pishrink/pishrink.sh /pishrink/big-image.img /pishrink/small-image.img

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.

Resources