Docker is stuck at "Docker is stopping" after waking up from sleep and having "Start Docker Desktop when you log in" enabled.
- [x] I have tried with the latest version of Docker Desktop
- [x] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID:
Expected behavior
When you use the "Start Docker Desktop when you log in" feature, after the computer wakes up from sleep, docker should be resuming normally.
Actual behavior
When the computer is awake from sleep, docker is stuck on "Docker is stopping" state. You cannot get out of this and computer needs to be restarted.
Workaround
Turn off "Start Docker Desktop when you log in" and sleep/wakeup will work as expected
Information
Please, help us understand the problem. For instance:
- Is it reproducible? Yes, steps below
- Is the problem new? Don't know
- Did the problem appear with an update? Don't know
- macOS Version: 12.5.1
- Intel chip or Apple chip: Apple M1 Pro
- Docker Desktop Version: 4.13.0 (89412), Engine: 20.10.20
Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
❯ /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
Starting diagnostics
[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[FAIL] DD0012: is the VM networking working? network checks failed: failed to ping host: exit status 1
[2022-10-28T20:15:31.081698000Z][com.docker.diagnose][I] ipc.NewClient: 047c71cc-diagnose-network -> diagnosticd.sock diagnosticsd
[common/pkg/diagkit/gather/diagnose.runIsVMNetworkingOK()
[ common/pkg/diagkit/gather/diagnose/network.go:34 +0xc8
[common/pkg/diagkit/gather/diagnose.(*test).GetResult(0x104fa3be0)
[ common/pkg/diagkit/gather/diagnose/test.go:46 +0x40
[common/pkg/diagkit/gather/diagnose.Run.func1(0x104fa3be0)
[ common/pkg/diagkit/gather/diagnose/run.go:17 +0x40
[common/pkg/diagkit/gather/diagnose.walkOnce.func1(0x2?, 0x104fa3be0)
[ common/pkg/diagkit/gather/diagnose/run.go:142 +0x80
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x1, 0x104fa3be0, 0x140007e1718)
[ common/pkg/diagkit/gather/diagnose/run.go:151 +0x88
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x0, 0x104fa3d60, 0x140007e1718)
[ common/pkg/diagkit/gather/diagnose/run.go:148 +0x50
[common/pkg/diagkit/gather/diagnose.walkOnce(0x104a61a60?, 0x140003df890)
[ common/pkg/diagkit/gather/diagnose/run.go:137 +0x8c
[common/pkg/diagkit/gather/diagnose.Run(0x104fa3d60, 0x1400042cf80?, {0x140003dfb08, 0x1, 0x1})
[ common/pkg/diagkit/gather/diagnose/run.go:16 +0x160
[main.checkCmd({0x140001b6010?, 0x6?, 0x4?}, {0x0, 0x0})
[ common/cmd/com.docker.diagnose/main.go:133 +0xdc
[main.main()
[ common/cmd/com.docker.diagnose/main.go:99 +0x30c
[2022-10-28T20:15:31.082322000Z][com.docker.diagnose][I] (71e67ab1) 047c71cc-diagnose-network C->S diagnosticsd POST /check-network-connectivity: {"ips":["192.168.50.165","192.168.149.13"]}
[2022-10-28T20:15:31.621928000Z][com.docker.diagnose][W] (71e67ab1) 047c71cc-diagnose-network C<-S a661e118-diagnosticsd POST /check-network-connectivity (539.674ms): failed to ping host: exit status 1
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0019: is the com.docker.vmnetd process responding?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?
Please investigate the following 1 issue:
1 : The test: is the VM networking working?
Failed with: network checks failed: failed to ping host: exit status 1
VM seems to have a network connectivity issue. Check your host firewall and anti-virus settings in case they are blocking the VM.
Steps to reproduce the behavior
- Enable "Start Docker Desktop when you log in" in docker desktop
- use as normal
- Go to apple menu, click on sleep
- Come back next morning and wake the computer
- Login, and docker desktop is stuck at "Docker is stopping"
- Cannot quit or restart docker
- Need to restart laptop
Adding my upvote to this issue.
I assumed it was a macOS Ventura 13.0 issue, as I upgraded on release and Docker has been problematic ever since!
Same Issue for me. After sleep and coming back to docker and it got stuck in stopping animation. MacOS Monterey 12.6.1 (Intel i7). Docker Desktop 4.13.0 (89412) Docker Engine v20.10.20
No commads even docker --version won't work.
Solution 1 Open "Activity monitor" Search "docker" Stop all docker related processes Reopen Docker or start the docker.
Solution 2 Restarting Laptop.
Having the same issue after updating to Ventura. Sleep causes the app to break and give perma "startup/teardown" animation in the taskbar.
Can confirm fix of killing all docker processes in Activity Monitor
I'm not convinced it's related to macOS sleeping.
I'm now running Amphetamine to try and ensure the Mac Mini server never sleeps.
However I'm still seeing the same problem where Docker Desktop shows "Docker is Stopping"
I've completely blown away all and anything thing to do with Docker Desktop, then re-downloaded and set-up a fresh copy. But the problem persists!
So either Amphetamine isn't preventing 'sleep' or it's something else!
I updated this morning to 4.13.1 (90346), so I'll see if that fixes anything!
EDIT: Still getting the Stopping issue with 4.13.1 :-(
@firecall Funny that you say that, cause I have the option "Start Docker Desktop when you log in" disabled, and this morning after wake up, i am getting the "Docker is stopping".
pkill docker same as killing all docker process using activity moniter? it seems to work for me to get it back up without restarting. I do have to wait about 15 sec before restarting docker desktop
- what are steps to take to prevent mac m1 mini from sleeping? i turned off sleep setting yet still docker desktop crashing
- what are some docker daemon , desktop health monitoring tools to use to see when it crashed? I use portainer but that is running on container itself.
docker desktop 4.13.1
Downgrading to 4.12.0 seems to fix the issue.
Downgrading to 4.12.0 seems to fix the issue.
Same for me.
Downgrade to 4.12.0 and zero issues.
I'm having the same problem after a sleep state. The only way to kill the "in progress" restart from a sleep state is to force kill the "Docker Desktop" process either from the command line or Activity monitor. Going back to 4.12 (again).
Monterey 12.6.1 (MBP 2015).
Same issue on macOS 12.6, even with Docker Desktop 4.14. Docker is stopping when waking from sleep after some hours.
Same issue on macOS 13.0.1 with Intel chip, with Docker Desktop 4.14.1 (91661) Downgrade Docker Desktop to 4.12.0 (85629) seems solved the problem.
Same issue on Monterey M1 and Hacmini(Inter NUC with i7 8Gen)
I also had no issues with my M1 Mac Mini until a month ago or so but now find after a few days, that my docker desktop is stopped. I suspect that it is the same 4.14 upgrade as others have said that they no longer have the issue downgrading to 4.12
Can someone point me in the direction to downgrade to 4.12?
For those asking how to stop your mac going to sleep.. In Ventura... --> "System Settings" and search for "display energy" and select the result "display energy setting... display" and toggle ON the bottom field "Prevent automatic sleeping when display is off"
@DrJohnM61 Here is it: https://docs.docker.com/desktop/release-notes/#4120
@JasonLamv-t Thank you for providing the link. A lot simpler than I had thought.
Thank you for the downgrading suggestion. This has been driving us crazy for the last week. Hopefully it can be sorted out soon.
Point to note on downgrading - turn off auto update in system preferences!
Same issue on MBP i9 & Mac Studio M1 Max
Same issue on MBP i9 & Mac Studio M1 Max
Downgrading to 4.12 has fixed the problem for me. In fact, no issues with 4.12 and forgot to disable the auto upgrade. Worked fine under 4.12 and then auto upgraded and failed again. Downgraded and no issues since. BTW, my M1 does not go to sleep, so I do not think that this is a sleep related issue.
This issue caught me off guard as well. Downgrading to 4.12 (and disabling auto update) has been my workaround as well. MacBook Pro M1 Pro Ventura 13.0.1.
Same issue here, Apple MacBook Pro (M1 Pro), Ventura (13.1). To fix it, I have to force quit Docker Desktop for Mac and kill docker (ps aux | grep Docker) related processes and then start Docker Desktop for Mac.
Same here, Mac M1 Pro, Ventura 13.1, but downgrading to 4.12 does not fix it ☹️
Same here, Macbook Air M2, Monterey, 12.6.2 (21G320. Only working fix I've found so far is downgrading.
I'm not convinced it's related to macOS sleeping.
I'm now running Amphetamine to try and ensure the Mac Mini server never sleeps.
However I'm still seeing the same problem where Docker Desktop shows "Docker is Stopping"
Just adding to this point, I can confirm that this issue isn't 1:1 correlated to sleep. Today my docker is running totally normally after my machine sleeping overnight, so it is, at best, intermittent (the most fun of all kinds of issues).
Yes - Agreed. As reported above, I do not let my M1 mini sleep and it happens regardless. Fixed by downgrading version and turning off auto updates.
I'm not convinced it's related to macOS sleeping.
I'm now running Amphetamine to try and ensure the Mac Mini server never sleeps.
However I'm still seeing the same problem where Docker Desktop shows "Docker is Stopping"
Just adding to this point, I can confirm that this issue isn't 1:1 correlated to sleep. Today my docker is running totally normally after my machine sleeping overnight, so it is, at best, intermittent (the most fun of all kinds of issues).
Can also confirm that after downgrading to 4.12.0 the stability problems are gone. Using a Intel MBP with MacOS 13.0.1
regards
spachner
Any words from the Devs on this?
In the spirit of attempting to provide some more information, here's logs for the state my system was/is in at time of Docker crashing/failing: https://gist.githubusercontent.com/fennb/6dc22ebfd4c4ad806af8fb46b7c9fb9d/raw/29ca8b049a20dbfc59a7cc81d80b8521bd2b1553/docker_vpnkit.logs
In this case, I suspect it was related to machine sleep (hard to know as per my comments above) so there presumably may not be any logs of it catching it "in the act", but hopefully the logs are somewhat useful in diagnosing the state of the system.
Happy to perform more detailed diagnosis if one of the devs wants to point me in the right direction.
It has worked to me. Thanks!
pkill dockersame as killing all docker process using activity moniter? it seems to work for me to get it back up without restarting. I do have to wait about 15 sec before restarting docker desktop
- what are steps to take to prevent mac m1 mini from sleeping? i turned off sleep setting yet still docker desktop crashing
- what are some docker daemon , desktop health monitoring tools to use to see when it crashed? I use portainer but that is running on container itself.
docker desktop 4.13.1
I am having this issue as well. Gonna try disabling the virtualization framework to see if that helps. On v 4.16.2.