docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 118 forks source link

Docker failing to start on M1 Mac #7050

Open adammartin-mednax opened 1 year ago

adammartin-mednax commented 1 year ago

Description

Docker engine fails to start. I cannot find much of interest.

Closest is when I stream the log files I find is this: 2023-10-30 15:12:40.919311-0400 localhost com.docker.backend[1131]: still waiting to refresh Registry Access Management policy in the VM after 16m8.602542792s: Post "http://ipc/refresh": dial unix /Library/Containers/com.docker.docker/Data/dns-forwarder.sock: connect: no such file or directory

When I run a self diagnostic the following is what I get out:

Starting diagnostics

[2023-10-30T19:01:29.030986000Z][com.docker.diagnose.ipc][I] ipc.NewClient: 364db0ea-diagnose -> /Library/Containers/com.docker.docker/Data/backend.sock BackendAPI [2023-10-30T19:01:29.031298000Z][com.docker.diagnose.ipc][I] (111808a3) 364db0ea-diagnose C->S BackendAPI POST /idle/make-busy [2023-10-30T19:01:29.032132000Z][com.docker.diagnose.ipc][I] (111808a3) 364db0ea-diagnose C<-S 7438fa8e-BackendAPI POST /idle/make-busy (846.417µs): 0x14000150a70 [2023-10-30T19:01:30.032408000Z][com.docker.diagnose.ipc][I] (1f607747) 364db0ea-diagnose C->S BackendAPI GET /idle [2023-10-30T19:01:30.038865000Z][com.docker.diagnose.ipc][I] (1f607747) 364db0ea-diagnose C<-S 7438fa8e-BackendAPI GET /idle (6.36825ms): {"apisInFlight":{},"booted":false,"busyReason":["timed activities: map[/idle/make-busy:28.9958075s]"],"containers":0,"idle":"bool","kubernetesEnabled":false,"reduced":false,"services":0,"timedActivities":{"/idle/make-busy":"float64"},"vmPaused":false,"vmRunning":true,"vmStopped":false,"windowsContainers":false} [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? [FAIL] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [FAIL] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [FAIL] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [FAIL] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [FAIL] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [FAIL] DD0013: is the $PATH ok? unable to find docker executable on PATH [FAIL] DD0003: is the Docker CLI working? prereq failed: is the Docker engine running? [FAIL] DD0038: is the connection to Docker working? prereq failed: is the Docker engine running? [FAIL] DD0014: are the backend processes running? prereq failed: is the LinuxKit VM running? [FAIL] DD0007: is the backend responding? prereq failed: are the backend processes running? [FAIL] DD0009: is the vpnkit API responding? prereq failed: are the backend processes running? [FAIL] DD0010: is the Docker API proxy responding? prereq failed: are the backend processes running? [FAIL] DD0030: is the image access management authorized? prereq failed: is the Docker engine running? [PASS] DD0033: does the host have Internet access? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [WARN] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [WARN] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [WARN] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [WARN] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [WARN] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [WARN] DD0032: do Docker networks overlap with host IPs? prereq failed: does the Docker API work?

Please note the following 6 warnings:

1 : The check: can a VM be started? Produced the following warning: vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

2 : The check: is the LinuxKit VM running? Produced the following warning: prereq failed: can a VM be started?

The Docker engine runs inside a Linux VM. Therefore the VM must be running.

3 : The check: are the LinuxKit services running? Produced the following warning: prereq failed: is the LinuxKit VM running?

The Docker engine runs inside a Linux VM as a service. Therefore the services must have started.

4 : The check: is the Docker engine running? Produced the following warning: prereq failed: are the LinuxKit services running?

The Docker engine manages all containers and images on the host. Check the dockerd.log to see why it failed to start.

5 : The check: does the Docker API work? Produced the following warning: prereq failed: is the Docker engine running?

If the Docker API is not available from the host then Docker Desktop will not work correctly.

6 : The check: do Docker networks overlap with host IPs? Produced the following warning: prereq failed: does the Docker API work?

If the subnet used by a Docker network overlaps with an IP used by the host, then containers won't be able to contact the overlapping IP addresses.

Try configuring the IP address range used by networks: in your docker-compose.yml. See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address

Please investigate the following 2 issues:

1 : The test: can a VM be started? Failed with: vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

2 : The test: is the $PATH ok? Failed with: unable to find docker executable on PATH

The directory containing the docker CLI tools must be on the $PATH

Reproduce

  1. Install docker (I did a complete uninstall, restart, and install)
  2. Run docker desktop (it will just hang)

Expected behavior

Docker should just run

docker version

Docker does not seem to install the command line tools

docker info

Docker does not seem to install the command line tools

Diagnostics ID

9dd97c78-d618-4aa5-89a4-f7f369d6b7d7/20231030191705

Additional Info

No response

fogelito commented 1 year ago

I have the same issue!

fogelito commented 1 year ago

[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? [FAIL] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [FAIL] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [FAIL] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [FAIL] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [FAIL] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [PASS] DD0013: is the $PATH ok? [FAIL] DD0003: is the Docker CLI working? prereq failed: is the Docker engine running? [FAIL] DD0038: is the connection to Docker working? prereq failed: is the Docker engine running? [FAIL] DD0014: are the backend processes running? prereq failed: is the LinuxKit VM running? [FAIL] DD0007: is the backend responding? prereq failed: are the backend processes running? [FAIL] DD0009: is the vpnkit API responding? prereq failed: are the backend processes running? [FAIL] DD0010: is the Docker API proxy responding? prereq failed: are the backend processes running? [FAIL] DD0030: is the image access management authorized? prereq failed: is the Docker engine running? [PASS] DD0033: does the host have Internet access? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [WARN] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [WARN] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [WARN] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [WARN] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [WARN] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [WARN] DD0032: do Docker networks overlap with host IPs? prereq failed: does the Docker API work?

tomaroberts commented 1 year ago

I'm also having similar issue on my M1 Macbook. Running Monterey v12.1. Have tried all sorts – reinstalling Docker Desktop, force quitting processes and removing various docker system files, etc.

My Docker Desktop says "is Stopped", and just hangs constantly, but the little whale icon with the cubes is permanently running its animation. If I try to Restart, Docker Desktop just hangs and I have to force quit the processes in Activity Manager.

V frustrating :(

/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check Starting diagnostics

[2023-11-02T13:09:56.800840000Z][com.docker.diagnose.ipc][I] ipc.NewClient: f885ef8a-diagnose -> /Library/Containers/com.docker.docker/Data/backend.sock BackendAPI [2023-11-02T13:09:56.801774000Z][com.docker.diagnose.ipc][I] (9a7926fc) f885ef8a-diagnose C->S BackendAPI POST /idle/make-busy [2023-11-02T13:09:56.805084000Z][com.docker.diagnose.ipc][I] (9a7926fc) f885ef8a-diagnose C<-S 9f394fc8-BackendAPI POST /idle/make-busy (3.29225ms): 0x14000011498 [2023-11-02T13:09:57.802491000Z][com.docker.diagnose.ipc][I] (f650027a) f885ef8a-diagnose C->S BackendAPI GET /idle [2023-11-02T13:09:57.807450000Z][com.docker.diagnose.ipc][I] (f650027a) f885ef8a-diagnose C<-S 9f394fc8-BackendAPI GET /idle (4.849584ms): {"apisInFlight":{},"booted":false,"busyReason":["timed activities: map[/idle/make-busy:28.998868584s]"],"containers":0,"idle":"bool","kubernetesEnabled":false,"reduced":false,"services":0,"timedActivities":{"/idle/make-busy":"float64"},"vmPaused":false,"vmRunning":true,"vmStopped":false,"windowsContainers":false} [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? [FAIL] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [FAIL] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [FAIL] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [FAIL] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [FAIL] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [PASS] DD0013: is the $PATH ok? [FAIL] DD0003: is the Docker CLI working? prereq failed: is the Docker engine running? [FAIL] DD0038: is the connection to Docker working? prereq failed: is the Docker engine running? [FAIL] DD0014: are the backend processes running? prereq failed: is the LinuxKit VM running? [FAIL] DD0007: is the backend responding? prereq failed: are the backend processes running? [FAIL] DD0009: is the vpnkit API responding? prereq failed: are the backend processes running? [FAIL] DD0010: is the Docker API proxy responding? prereq failed: are the backend processes running? [FAIL] DD0030: is the image access management authorized? prereq failed: is the Docker engine running? [PASS] DD0033: does the host have Internet access? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [WARN] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [WARN] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [WARN] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [WARN] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [WARN] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [WARN] DD0032: do Docker networks overlap with host IPs? prereq failed: does the Docker API work?

Please note the following 6 warnings:

1 : The check: can a VM be started? Produced the following warning: vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

2 : The check: is the LinuxKit VM running? Produced the following warning: prereq failed: can a VM be started?

The Docker engine runs inside a Linux VM. Therefore the VM must be running.

3 : The check: are the LinuxKit services running? Produced the following warning: prereq failed: is the LinuxKit VM running?

The Docker engine runs inside a Linux VM as a service. Therefore the services must have started.

4 : The check: is the Docker engine running? Produced the following warning: prereq failed: are the LinuxKit services running?

The Docker engine manages all containers and images on the host. Check the dockerd.log to see why it failed to start.

5 : The check: does the Docker API work? Produced the following warning: prereq failed: is the Docker engine running?

If the Docker API is not available from the host then Docker Desktop will not work correctly.

6 : The check: do Docker networks overlap with host IPs? Produced the following warning: prereq failed: does the Docker API work?

If the subnet used by a Docker network overlaps with an IP used by the host, then containers won't be able to contact the overlapping IP addresses.

Try configuring the IP address range used by networks: in your docker-compose.yml. See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address

Please investigate the following 1 issue:

1 : The test: can a VM be started? Failed with: vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines

fogelito commented 1 year ago

Upgrade to Sonoma OS

tomaroberts commented 1 year ago

:(

hc18qoz commented 1 year ago

I am having the same issue which started after I upgraded to Sonoma.

harmanpr commented 1 year ago

I was experiencing the exact same issue until I upgraded to MacOS 12.7.1. Go to Software Update, under Other updates are available, select more info..., it'll open a new dialog box, select 12.7.1. The update should take between 30min-1hr. After the upgrade, Docker Desktop and application started without any issues. I hope this helps.

fogelito commented 1 year ago

I'm also having similar issue on my M1 Macbook. Running Monterey v12.1. Have tried all sorts – reinstalling Docker Desktop, force quitting processes and removing various docker system files, etc.

My Docker Desktop says "is Stopped", and just hangs constantly, but the little whale icon with the cubes is permanently running its animation. If I try to Restart, Docker Desktop just hangs and I have to force quit the processes in Activity Manager.

V frustrating :(

/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check Starting diagnostics [2023-11-02T13:09:56.800840000Z][com.docker.diagnose.ipc][I] ipc.NewClient: f885ef8a-diagnose -> /Library/Containers/com.docker.docker/Data/backend.sock BackendAPI [2023-11-02T13:09:56.801774000Z][com.docker.diagnose.ipc][I] (9a7926fc) f885ef8a-diagnose C->S BackendAPI POST /idle/make-busy [2023-11-02T13:09:56.805084000Z][com.docker.diagnose.ipc][I] (9a7926fc) f885ef8a-diagnose C<-S 9f394fc8-BackendAPI POST /idle/make-busy (3.29225ms): 0x14000011498 [2023-11-02T13:09:57.802491000Z][com.docker.diagnose.ipc][I] (f650027a) f885ef8a-diagnose C->S BackendAPI GET /idle [2023-11-02T13:09:57.807450000Z][com.docker.diagnose.ipc][I] (f650027a) f885ef8a-diagnose C<-S 9f394fc8-BackendAPI GET /idle (4.849584ms): {"apisInFlight":{},"booted":false,"busyReason":["timed activities: map[/idle/make-busy:28.998868584s]"],"containers":0,"idle":"bool","kubernetesEnabled":false,"reduced":false,"services":0,"timedActivities":{"/idle/make-busy":"float64"},"vmPaused":false,"vmRunning":true,"vmStopped":false,"windowsContainers":false} [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? [FAIL] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [FAIL] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [FAIL] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [FAIL] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [FAIL] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [PASS] DD0013: is the $PATH ok? [FAIL] DD0003: is the Docker CLI working? prereq failed: is the Docker engine running? [FAIL] DD0038: is the connection to Docker working? prereq failed: is the Docker engine running? [FAIL] DD0014: are the backend processes running? prereq failed: is the LinuxKit VM running? [FAIL] DD0007: is the backend responding? prereq failed: are the backend processes running? [FAIL] DD0009: is the vpnkit API responding? prereq failed: are the backend processes running? [FAIL] DD0010: is the Docker API proxy responding? prereq failed: are the backend processes running? [FAIL] DD0030: is the image access management authorized? prereq failed: is the Docker engine running? [PASS] DD0033: does the host have Internet access? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [WARN] DD0017: can a VM be started? vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory [WARN] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started? [WARN] DD0011: are the LinuxKit services running? prereq failed: is the LinuxKit VM running? [WARN] DD0004: is the Docker engine running? prereq failed: are the LinuxKit services running? [PASS] DD0015: are the binary symlinks installed? [WARN] DD0031: does the Docker API work? prereq failed: is the Docker engine running? [WARN] DD0032: do Docker networks overlap with host IPs? prereq failed: does the Docker API work? Please note the following 6 warnings: 1 : The check: can a VM be started? Produced the following warning: vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines. 2 : The check: is the LinuxKit VM running? Produced the following warning: prereq failed: can a VM be started? The Docker engine runs inside a Linux VM. Therefore the VM must be running. 3 : The check: are the LinuxKit services running? Produced the following warning: prereq failed: is the LinuxKit VM running? The Docker engine runs inside a Linux VM as a service. Therefore the services must have started. 4 : The check: is the Docker engine running? Produced the following warning: prereq failed: are the LinuxKit services running? The Docker engine manages all containers and images on the host. Check the dockerd.log to see why it failed to start. 5 : The check: does the Docker API work? Produced the following warning: prereq failed: is the Docker engine running? If the Docker API is not available from the host then Docker Desktop will not work correctly. 6 : The check: do Docker networks overlap with host IPs? Produced the following warning: prereq failed: does the Docker API work? If the subnet used by a Docker network overlaps with an IP used by the host, then containers won't be able to contact the overlapping IP addresses. Try configuring the IP address range used by networks: in your docker-compose.yml. See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address Please investigate the following 1 issue: 1 : The test: can a VM be started? Failed with: vm has not started: failed to open init.log: open log/vm/init.log: no such file or directory The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines

Upgrade you OS to Sonoma!

vasyan commented 1 year ago

Same problem. Got my system rebooted and was struck in this loop.

AntSworD commented 1 year ago

open activity monitor,filter docker, force quit Docker and Docker Desktop

then

 cd ~/Library/Group\ Containers/group.com.docker/
mv settings.json settings.json.bak

relaunch Docker app

tomaroberts commented 1 year ago

Can confirm that upgrading from Monterey v12.1 to Sonoma fixed Docker for me.

alex-berger commented 1 year ago

Same problem here with Docker Desktop (version v4.25.1) on macOS (Sonoma 14.1.1) with Apple Silicon.

[2023-11-15T15:31:44.289613000Z][com.docker.backend.registryaccess][W] still waiting to refresh Registry Access Management policy in the VM after 3m26.98508475s: Post "http://ipc/refresh": dial unix <HOME>/Library/Containers/com.docker.docker/Data/dns-forwarder.sock: connect: no such file or directory
[2023-11-15T15:32:48.391974000Z][com.docker.backend.registryaccess][W] still waiting to refresh Registry Access Management policy in the VM after 4m31.087524041s: Post "http://ipc/refresh": dial unix <HOME>/Library/Containers/com.docker.docker/Data/dns-forwarder.sock: connect: no such file or directory
[2023-11-15T15:33:52.493341000Z][com.docker.backend.registryaccess][W] still waiting to refresh Registry Access Management policy in the VM after 5m35.1889775s: Post "http://ipc/refresh": dial unix <HOME>/Library/Containers/com.docker.docker/Data/dns-forwarder.sock: connect: no such file or directory
placeposition commented 11 months ago

Same - Updated to MacOS Sonoma 14.1.1 and can no longer reach the php server container in the browser as I did before the update. Updated Docker Desktop 4.25.2 (129061) to latest and still the same.

hugoofab commented 7 months ago

It worked to me when I've uninstalled last version of docker deleting it, deleting also the com.docker.docker folder from Library and installed it again with command line:

uninstalling docker (do as your own risk)

rm -rf /Applications/Docker.app rm -rf ~/Library/Containers/com.docker.docker

just for mount downloaded docker dmg

sudo hdiutil attach ~/Downloads/Docker.dmg

install it

/Volumes/Docker/Docker.app/Contents/MacOS/install

unmount

sudo hdiutil detach /Volumes/Docker/