Fatal Error: Docker daemon failed to start with Docker Desktop - macos

I'm on MacOS 12.1. I downloaded Docker Desktop from the Docker site, but when starting it, I always get the following error:
level=error msg="Handler for GET /v1.24/services returned error: This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again."
How can I resolve this problem? All the results I can find for this error already have the daemon started and working. I can't even get the daemon started. I haven't ever touched docker swarm.
Running any of the suggested commands fails because there is no running docker daemon.
Reseting to factory defaults does not resolve the issue.
Reinstalling Docker Desktop does not resolve the issue.
Reinstalling the Docker cli does not resolve the issue.
Restarting the machine does not resolve the issue.
What do I do to fix this issue?

What I ended up doing was uninstalling Homebrew. Apparently something there was causing issues, even though I didn't install Docker Desktop through brew, and made sure to uninstall all formulas that had anything to do with Docker. Exactly what caused this problem is a mystery still.

I had the same problem.
And I found this log is catched from ~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log
I try to restart Docker Desktop, but this log doesn't append any content. The strange thing is error Dialog display the same content, even time! Which means Docker Desktop never try to start docker daemon.
I try to close Wi-Fi, then Docker Desktop will start normally.
Check dockerd.log again, this print the same error with new time, but Docker Desktop running normally.
So I think there is some error relate Docker Desktop network process rather than docker daemon.
Additionally, maybe docker daemon printed this error because of network driver is overlay which require a swarm node.

Related

Why docker desktop is unable to start docker-backend?

Problem:
I started my system as usual but my docker-desktop doesn't work, WSL doesn't respond to commands and there is a process called "Vmmem" using 25% of my memory. I have tried a bunch of thing but nothing seems to work.
System Attributes:
Windows 10 Pro (10.0.19045.2486)
docker: 4.15
WSL: 1.0.3.0
More context:
Recently I was having trouble with my docker set up. I have one particular container that was "crashing" the docker. It was not throwing any exception but after some event (that I couldn't find out) all the other container where unreachable any attempt to stop/start another container would result on "Error: 500 failed to respond...". When this happens I usually just restart the system and everything works fine, but today it wasn't the case. I restarted and I noticed that I had the "Vmmem" process already running at 25% (it usually just reaches this point at the end of the day), the docker desktop could not start the docker backend and when I tried running wsl -l -v I got no response. I can use some docker commands like docker -v but the docker compose up doesn't work at all.
What I've tried:
restart the system again (nothing changed, still starting with 25% mem usage)
deactivating Hyper-V (nothing happened)
stop/start docker service using net start/stop <service> (it gives a response but didn't solve the problem)
Uninstall docker-desktop (it crashes before even starting the uninstall process)
Terminate WSL wsl -t Ubuntu (got no response from wsl)
Overwrite installation with Docker 4.16 (it gets stuck on "Preparing for update... / Stopping VM and preparing for update")
Forcefully kill the "Vmmem" (I've got Access denied error)
Edit 1:
I managed to finally install the Docker desktop 4.16 but the problem continues, system starts with 25% Vmmem memory usage and docker desktop is not able to initiate backend.
the process Vmeem It represents the memory and CPU consumed by the combination of all the virtual machines running on your Windows PC, there is a possibility that processes are still running on your PC. I recommend you try to launch these commands from the console:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
This will stop all containers and delete them.
If this doesn't work, I recommend you enter your bios settings and disable virtualization, that way those processes will stop, then you can enable it again and try. I wish you luck and I hope this resolves.
Steps that I did to be able to stop "Vmmem" process and install docker desktop again:
disable Hyper-V
disable virtualization (BIOS)
restart system
to this point the "Vmmem" problem was gone
uninstall docker desktop
rm all wsl instances
enable Hyper-V
enable hypervisorlaunchtype
restart system
enable virtualization (BIOS)
install wsl Ubuntu instance
install Docker Desktop
Maybe some steps listed here are redundant but that is what I did. hope it helps if other people is passing through the same problem

Cannot find the docker container running on port 80, tried everything usual

What happened:
I ran a container (vuejs-build website on a httpd:2.4) from shell (oh my zsh) on mac OS 11.2.2 using the previous docker release.
Then I updated the mac OS docker desktop.
Now the container is running but it's not showing on docker ps -a or docker container ls -a. I cannot find the process no matter what I try. Tried all the ps aux commands with grep, all lsof -wahtever, finding it in activity tool on mac. Even restarting the mac or stopping docker deamon does not stop it.
Has anybody a clue how to find it? I can open and refresh the webpage that is running in the container.
Docker version now says: Docker version 20.10.5, build 55c4c88.
PLEASE HELP!!
I solved it myself:
The container was stuck but restart seemed to have actually killed it.
However:
I realized that assets such as images are not being loaded despite JS and CSS is.
So I tried starting another httpd instance with docker run -p 80:80 httpd and reloaded. Firstly the same site as before appeared. But being able to start another httpd got me thinking.
The I opened dev tools in my browser. That disables Cache (using Chrome). Another hit on refresh then showed the "It works" page from httpd.
Some researching gave me the following theory: Vuejs stores the compiled Markup, JS and CSS on your browsers persistence storage. Probably for performance.

Unable to connect to Docker daemon WINDOWS

I've installed Stable Docker Desktop for WINDOWS 10. I tried running:
docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
So it appears that it can connect to Docker daemon. However when I run my own command:
C:\Users\cortex>bash
DESKTOP-2GHN95P:/tmp/docker-desktop-root/mnt/host/c/Users/cortex/# cortex deploy
I get following error:
error: unable to connect to the Docker daemon
please confirm Docker is running, or if Docker is not installed, install it by following the instructions for your operating system: https://docs.docker.com/install
I'm new to Docker and I can't figure out this problem. Anyone has any ideas?
Looks like you're trying to run cortex from a WSL, which is trying to take action on the docker engine in the host OS. If you have WSL 2, you can enable the WSL 2 integration for Docker desktop in the settings. If that's not an option, you can always install docker on your WSL instead,

docker pull centos timeout on windows 8.1

When I run from command line
docker pull centos
I got timeout error. I have no proxy and try from different networks and stucked on this. What reason can be?
Since you wrote that you use Windows 8 I assume that you run boot2docker?
Can you first verify that you can connect to boot2docker itself? E.g. with docker ps? If you still get timeouts issuing that command, make sure boot2docker is running by typing boot2docker restart.
If you can connect to boot2docker without any problems and the docker pull centos problem remains then it seems you have other kind of networking problems on your site which block your connections.

Porting issue with Docker

Hey I tried running the command
sudo docker run -d -P training/webapp python app.py"
from the tutorial but I keep getting the error
FATA[0000] Error response from daemon: Cannot start container.
I downloaded the image fine but the trouble occurs whenever I try to run it. I checked the port sudo docker port (name) and nothing shows up. I'm guessing the issue is that the PORTS aren't being set up properly. I have a mac and I'm using vmware with ubuntu and I downloaded the ubuntu set up for docker.
Is there anyway to fix this? Any help would be greatly appreciated.

Resources