for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Docker desktop starting...forever

Open papajo opened this issue 8 years ago • 54 comments

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: ABF78C4C-2B2E-41F3-B2FA-5B1FB40B461B/20181203224527

Expected behavior

Actual behavior

Information

  • macOS Version: mojave 10.14.1

Diagnostic logs

Docker for Mac: version...
Version 2.0.0.0-mac81 (29211)
Channel: stable
4271b9e6a8

Steps to reproduce the behavior

  1. ...Install update (lates)
  2. ...Start Docker and watch it go for eternity

papajo avatar Dec 03 '18 23:12 papajo

Same thing. Even without update if I try to stop/start docker it does not start again. Trying to gather diagnostics also takes forever.

Mojave 10.14.1, docker mac78, mac82.

Only rebooting helps.

holycheater avatar Dec 04 '18 11:12 holycheater

Same problem here, I can't get docker to start. In my case rebooting still didn't fix the issue. It started when I added "RUN mkdir ./build" to the dockerfile below, and then tried to build it in my directory using "docker build ."

FROM node:10-slim

# Install app dependencies
COPY package*.json ./
RUN npm ci

RUN mkdir ./build
COPY build ./build

ARG NODE_ENV=production
ENV NODE_ENV ${NODE_ENV}
RUN echo $NODE_ENV

ARG PORT=3001
ENV PORT ${PORT}
RUN echo $PORT

USER node

CMD npm run start-prod

my specs:

Mac OS 10.14.1 Docker for Mac 2.0.0.0-mac81

sec0ndhand avatar Dec 05 '18 16:12 sec0ndhand

I had same situation with Docker for Mac starting forever. The issue was in incorrect ownership/permissions on /usr/local/bin, it was for some reason postgres:wheel 0700, after changing it to root:wheel 0755 and killing Docker and starting it again, everything worked fine.

vonamann avatar Dec 27 '18 18:12 vonamann

Same situation, but solved in my case by resetting the Docker Desktop app as below. Don't know the cause though.

  • [Preferences...] - [Reset 💣] - [Reset to factory defaults]

UPDATE 2019/08/17: With @daniel-marquez' workaround such as resetting the docker in safe-mode made my Docker run more stable since then.

Env info
  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [x] I have uploaded Diagnostics
  • Diagnostic ID: E0CAAAAF-C5D8-4BC9-BEF9-8DAB50FD94FD/20181230075634
  • macOS HighSiearra (OSX 10.13.6, Intel 2.7GHz Core i5)
  • Docker Desktop: V.2.0.0.0-mac81(29211) (Latest at 2018/12/20)
  • Channel: stable
  • 4271b9e6a8
  • Engine: 18.09.0
  • Compose: 1.23.2
  • Machine: 0.16.0
  • Notary: 0.6.1
  • Credential Helper: 0.6.0
  • Kubernetes: 1.10.3
  • VirtualBox: v6.0.10 Installed
  • VM Ware: Not installed

KEINOS avatar Dec 30 '18 08:12 KEINOS

It worked for me after restarting my machine... I think it got stuck in a state since I didnt use my macbook for a long while and then it went from sleep to turned off...

jimmybrawn avatar Jan 07 '19 09:01 jimmybrawn

The only thing I noticed is that com.docker.hyperkituses 100% cpu and hanging forver. Attaching some sort of sample trace from macOS activity monitor app, not sure if this would be of any use.

Sample of com.docker.hyperkit.txt

holycheater avatar Jan 11 '19 12:01 holycheater

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Apr 11 '19 02:04 docker-robott

  • [X] I have tried with the latest version of my channel (Stable or Edge)
  • [X] I have uploaded Diagnostics
  • Diagnostics ID: 5CBBAA5E-E436-4655-84CC-E7C47862B66F/20190413181228

Expected behavior

  • Docker Desktop for mac should move past 'Docker Desktop is starting' phase at startup
  • Docker Desktop for mac should not crash during 'Docker Desktop is starting' phase at startup

Actual behavior

  • Docker desktop for mac hangs forever at startup when in the 'Docker Desktop is starting' phase
  • Docker desktop for mac occasionally crashes during 'Docker Desktop is starting' phase occasionally complaining about the symlinks in the /usr/local/bin directory
  • After a complete uninstall/reinstall, Docker Desktop for mac will successfully move past the 'Docker Desktop is starting phase' However, upon shutdown/reboot of the machine, it will begin experiencing the same problems mentioned above in the first two bullets

Information

Background I was experiencing this issue and was able to fix it as I was typing this report up by changing my /usr/local/bin permissions from $USER:admin 775 (probably modified that way by homebrew) to $USER:staff 755. Changing to root:wheel 755 did not initally work for me (maybe I didn't hit the restart button on the menulet when I tried) it did however, work later when I was trying to reproduce the issue. I also tried to reproduce the issue by switching back to $USER:admin this seems to reproduce the error intermittently as docker initially crashed with the symlink error message and then started working after subsequent tries so I am not sure this permissions issue is the whole story.

I also later ran chmod 755 -R /usr/local/bin somewhere down the line which didn't directly fix the issue (I'm not a sysadmin or extremely familiar with group/permission issues so I wouldn't reccommend running this command unless the above fix doesnt work and someone smarter than me confirms that it is safe).

Additional Info I'm going to leave all of my symptoms here as well as the steps I took to 'fix' so others experiencing this problem will have this info.

  • macOS Version: Mac OS High Sierra 10.13.6 (17G65)
  • A few (but not all) crashes failed with the error message 'Docker stopped working: Failed to install symlinks in /usr/local/bin (stage 4)'
  • I believe /usr/local/bin initially had permissions of rwxrwxr-x with root admin as the owner and group respectively. I initally tried running chgrp wheel /usr/local/bin/ as described by another user above which did not initially fix my issue. After which I ran chmod 755 -R /usr/local/bin and chgrp staff /usr/local/bin. After doing this and clicking restart on the docker desktop menulet, docker finally went into the 'docker desktop is running' mode after about 2-3 minutes of being in the startup phase.
  • Here are my current (working) permissions for /usr/local/bin
s -l /usr/local | grep bin
drwxr-xr-x@ 256 $USER  staff   8704 Apr 13 11:26 bin
  • If needed, here are my current (working) permissions in the /usr/local/bin mentioning docker
ls -l /usr/local/bin | grep docker
lrwxr-xr-x  1 $USER  staff        54 Apr 13 11:26 docker -> /Applications/Docker.app/Contents/Resources/bin/docker
lrwxr-xr-x  1 $USER  staff        62 Apr 13 11:26 docker-compose -> /Applications/Docker.app/Contents/Resources/bin/docker-compose
lrwxr-xr-x  1 $USER  staff        77 Apr 13 11:26 docker-credential-osxkeychain -> /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain
lrwxr-xr-x  1 $USER  staff        62 Apr 13 11:26 docker-machine -> /Applications/Docker.app/Contents/Resources/bin/docker-machine
lrwxr-xr-x  1 $USER  staff        67 Apr 13 11:26 hyperkit -> /Applications/Docker.app/Contents/Resources/bin/com.docker.hyperkit
lrwxr-xr-x  1 $USER  staff        55 Apr 13 11:26 kubectl.docker -> /Applications/Docker.app/Contents/Resources/bin/kubectl
lrwxr-xr-x  1 $USER  staff        65 Apr 13 11:26 vpnkit -> /Applications/Docker.app/Contents/Resources/bin/com.docker.vpnkit

Version

Docker Desktop community: Version 2.0.0.3 (31259) Channel: stable 8858db33c8 Engine: 18.09.2 Notary: 0.6.1 Compose: 1.23.2 Credential Helper: 0.6.0 Machine: 0.16.1 Kubernetes: v1.10.11

Steps to reproduce the behavior

  1. Change group permissions on /usr/local/bin to admin
  2. Restart computer and (with luck) watch docker either stay in the startup phase forever or fail with 'Docker stopped working: Failed to install symlinks in /usr/local/bin (stage 4)'

timfoil avatar Apr 13 '19 18:04 timfoil

/remove-lifecycle stale

timfoil avatar Apr 13 '19 18:04 timfoil

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Jul 12 '19 01:07 docker-robott

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: 7808111C-C08B-46B0-8209-2B80C7184A2B/20190711194208

Expected behavior

Docker starts

Actual behavior

Docker stuck at starting with hyperkit process stuck at 100% CPU.

Information

It's been few days I'm not able to start docker. I don't know when the problem exactly appears. As I said is this comment, I tried a lot of things without consistent result.

  • macOS Version: 10.14.5

Diagnostic logs

2019-07-11 21:42:39.688166+0200  localhost com.docker.hyperkit[1045]:         \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;<…>
2019-07-11 21:42:39.741696+0200  localhost com.docker.hyperkit[1045]:        \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;5<…>
2019-07-11 21:42:39.795362+0200  localhost com.docker.hyperkit[1045]: 38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H         <…>
2019-07-11 21:42:39.849003+0200  localhost com.docker.hyperkit[1045]: 1;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H          <…>
2019-07-11 21:42:39.902712+0200  localhost com.docker.hyperkit[1045]:                    \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                   <…>
2019-07-11 21:42:39.956166+0200  localhost com.docker.hyperkit[1045]:                   \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                    <…>
2019-07-11 21:42:40.009737+0200  localhost com.docker.hyperkit[1045]:          \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38<…>
2019-07-11 21:42:40.062954+0200  localhost com.docker.hyperkit[1045]:         \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;<…>
2019-07-11 21:42:40.116454+0200  localhost com.docker.hyperkit[1045]: ing    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H        <…>
2019-07-11 21:42:40.169780+0200  localhost com.docker.hyperkit[1045]: 31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H         <…>
2019-07-11 21:42:40.223250+0200  localhost com.docker.hyperkit[1045]: 4;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                       \^[[28;58H                       \^[[29;58H                       \^[[30;58H                       \^[[31;58H                       \^[[32;58H                       \^[[33;58H                       \^[[34;58H                       \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                    <…>
2019-07-11 21:42:40.277035+0200  localhost com.docker.hyperkit[1045]:                    \^[[35;58H                       \^[[36;58H                       \^[[37;58H                       \^[[38;58H                       \^[[39;58H                       \^[[40;58H                       \^[[41;58H                       \^[[42;58H                       \^[[43;58H                       \^[[44;58H                       \^[[44;80H\^[[08;58HThis selection will    \^[[09;58Hdirect the system to   \^[[10;58Hcontinue to booting    \^[[11;58Hprocess                \^[[12;58H                       \^[[13;58H                       \^[[14;58H                       \^[[15;58H                       \^[[16;58H                       \^[[17;58H                       \^[[18;58H                       \^[[19;58H                       \^[[20;58H                       \^[[21;58H                       \^[[22;58H                       \^[[23;58H                       \^[[24;58H                       \^[[25;58H                       \^[[26;58H                       \^[[27;58H                   <…>

Steps to reproduce the behavior

I don't really understand when the problem occurs, but I assume it worked a few weeks ago.

Workaround

Access the VM created by docker's HyperKit following this. By chance, you will see this screen: Screenshot 2019-07-12 at 16 26 40 Once you hit ↑ ← → ↓, you will see the full menu, waiting for input: Screenshot 2019-07-12 at 16 27 26 And finally, if you hit ENTER, to select Continue, you will see that the VM booting with final message like this, and docker for mac started : Screenshot 2019-07-12 at 16 28 48

Would be great to know why this VM has a manual input ...

rev3r4nt avatar Jul 12 '19 14:07 rev3r4nt

I can confirm the provided workaround from @rev3r4nt works. For me this is a reproducible problem since a couple of days - I have attach to the TTY of the VM every time now if I want to use docker 👎

dmesser avatar Jul 14 '19 08:07 dmesser

/remove-lifecycle stale

rev3r4nt avatar Jul 15 '19 08:07 rev3r4nt

There are several of those issues opened and yet, no answers to the problem.

agjs avatar Jul 16 '19 10:07 agjs

@rev3r4nt solution worked for me as well. One gotcha for me was, when connecting with screen to the terminal of the VM I arrived at a blank screen. Once you type "enter" (won't be able to see) and press enter it actually started to show the booting screen - Still odd that it gets stuck there in the first place and should be investigated.

patrickwijerama avatar Jul 25 '19 17:07 patrickwijerama

For me the issue is not consistently reproducible anymore. It fails about 70% of the time.

dmesser avatar Jul 25 '19 17:07 dmesser

For me it takes around 3 minutes, this has to be a record of insane bad written software.

clankill3r avatar Jul 27 '19 13:07 clankill3r

Not sure if this is just a workaround or a way to fix the issue in OSX 10.14.6.

In my case, Docker decided to not work very early in the morning when I was about to start working. Checking OSX Console, I saw that little time after trying to start Docker, the console displayed strange messages, with non usual characters.

I tried absolutely everything I saw on the net (reseting, reinstalling, switching to edge, downgrading to older versions... all combined with lots of OSX reboots) but has no success at all. I was about to reinstall the OS when decided to try something that didn't see on internet: restart OSX in safe mode.

After restarting in safe mode, I tried to run Docker and looks like it's not possible at all, but it gave me the chance to reset to factory defaults from there, and I accepted.

After rebooting again to normal mode, Docker started to work correctly.

Hope this may help others having he same issue.

daniel-marquez avatar Aug 15 '19 08:08 daniel-marquez

I changed to the Edge channel to try out some of the new buildx commands and it's been booting normally ever since.

dmesser avatar Aug 15 '19 09:08 dmesser

It was broken for me right after the initial installation, but @rev3r4nt´s workaround fixed it for me as well. I used screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty to log into the docker host VM, got a black screen. pressing return brought me to the prompt as root. With the command "reboot" I restarted the machine. Open restarting a pop-up window offered me to reset to factory defaults. I did so, was promoted for an admin password (maybe I forgot to provide that the first time?). I connected to the vm again and saw the booting info. After it was done all worked fine :)

I will post again if this was just a temporary fix - if I don´t it was a permanent solution for me :)

patmuk avatar Aug 16 '19 21:08 patmuk