Docker for Mac exits with: com.docker.osx.xhyve.linux failed to start

Information

(The following data was gathered after I addressed the issue)

OS X: version 10.10.5 (build: 14F1713)
Docker.app: version v1.11.0-beta7
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160420-013631.tar.gz
Most specific failure is: No error was detected
Your unique id is: 6E39E05F-C27F-4C66-8CCB-F3F9C8DB2124
Please quote this in all correspondence.

Description

I’ve already set up Docker for Mac for one of my OS X user accounts successfully, however, when I run it on my other account, I get this error.

Here are the log entries (after several attempts):

2016-04-19T23:17:28.177635+08 Error - 2016/04/19 23:17:28.175834 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:17:29.206824+08 Error - 2016/04/19 23:17:29.206440 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:17:30.233044+08 Error - 2016/04/19 23:17:30.232655 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:17:31.263451+08 Error - 2016/04/19 23:17:31.263029 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:17:32.292707+08 Error - 2016/04/19 23:17:32.292343 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:17:33.316165+08 Error - 2016/04/19 23:17:33.315805 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:13.527956+08 Error - 2016/04/19 23:19:13.526689 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:14.557634+08 Error - 2016/04/19 23:19:14.557211 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:27.661736+08 Error - 2016/04/19 23:19:27.661165 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:28.691350+08 Error - 2016/04/19 23:19:28.690945 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:29.725715+08 Error - 2016/04/19 23:19:29.725358 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:30.755616+08 Error - 2016/04/19 23:19:30.755188 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:31.779985+08 Error - 2016/04/19 23:19:31.779575 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}
2016-04-19T23:19:32.806800+08 Error - 2016/04/19 23:19:32.806409 task.go:50: Failed to remove existing socket on /var/tmp/com.docker.osxfs.socket: &os.PathError{Op:"remove", Path:"/var/tmp/com.docker.osxfs.socket", Err:0xd}

To fix this issue, what I did was the following:

  1. Exit Docker through the error dialog.
  2. Created a temporary directory (say docker-stuff) in /var/tmp directory.
  3. Moved all com.docker.* files to the temporary directory (e.g. mv com.docker.* docker-stuff/)
  4. Restarted Docker for Mac.

After following those steps, I have been able to run Docker for Mac with no issues. I suspect that this problem may have something to do with file permissions in multi-user set up. However, when I checked the file causing the issue, the current user I’m running Docker owns it.