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

Docker does not start after upgrading to 20.10.5

Open perrog opened this issue 5 years ago • 14 comments

  • [ ] I have tried with the latest version of Docker Desktop
  • [ ] I have tried disabling enabled experimental features
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: 775AC0DC-4587-467F-B49E-FE4EA2FCD918/20210420085210

Actual behavior

Docker for Windows does not start. Happens every day I start computer. Troubleshooting > Clean / Purge data resolves the issue. But after Clean/Purge data I need to rebuild all images from scratch.

Example errors: $ docker ps error during connect: This error may indicate that the docker daemon is not running.: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json: open //./pipe/docker_engine: The system cannot find the file specified.

$ docker-compose up Traceback (most recent call last): File "docker\api\client.py", line 214, in _retrieve_server_version File "docker\api\daemon.py", line 181, in version File "docker\utils\decorators.py", line 46, in inner File "docker\api\client.py", line 237, in _get File "requests\sessions.py", line 543, in get File "requests\sessions.py", line 530, in request File "requests\sessions.py", line 643, in send File "requests\adapters.py", line 439, in send File "urllib3\connectionpool.py", line 670, in urlopen File "urllib3\connectionpool.py", line 392, in _make_request File "http\client.py", line 1255, in request File "http\client.py", line 1301, in _send_request File "http\client.py", line 1250, in endheaders File "http\client.py", line 1010, in _send_output File "http\client.py", line 950, in send File "docker\transport\npipeconn.py", line 32, in connect File "docker\transport\npipesocket.py", line 23, in wrapped File "docker\transport\npipesocket.py", line 72, in connect File "docker\transport\npipesocket.py", line 52, in connect pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "docker-compose", line 3, in File "compose\cli\main.py", line 81, in main File "compose\cli\main.py", line 199, in perform_command File "compose\cli\command.py", line 60, in project_from_options File "compose\cli\command.py", line 152, in get_project File "compose\cli\docker_client.py", line 41, in get_client File "compose\cli\docker_client.py", line 170, in docker_client File "docker\api\client.py", line 197, in init File "docker\api\client.py", line 221, in _retrieve_server_version docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.') [15076] Failed to execute script docker-compose

Expected behavior

Docker should start without needing to Clean/Purge data.

Information

After upgrading to 20.10.5 docker will not start correctly. This happens once every day (after reboot). Troubleshooting > Clean / Purge data resolves the issues. I only check "Hyper-V" and "WSL 2", but it seems to purge all my images. Windows 10 build 18363.1440 Docker desktop for Windows 20.10.5 WSL2 and Hyper-V The host is my computer. I'm using syntax=docker/dockerfile:1.2 in most of my Dockerfiles.

Steps to reproduce the behavior

It happens every day I start the computer. Begun after upgrading to 20.10.5.

perrog avatar Apr 20 '21 09:04 perrog

Same here.

BlowaXD avatar Apr 20 '21 09:04 BlowaXD

Seems to be the same problem as #10958

abrueck avatar Apr 20 '21 12:04 abrueck

Yes, the same problem. This issue is redundant.

perrog avatar Apr 20 '21 13:04 perrog

Have you tried this? https://github.com/docker/for-win/issues/1825#issuecomment-433719346

DockerCli.exe -SwitchDaemon

12trey avatar Apr 22 '21 11:04 12trey

Unfortunately no. Switching between windows and linux mode does not solve it. When I switch back to linux mode the same problem appears.

perrog avatar Apr 22 '21 12:04 perrog

For me the simplest way to workaround is to Clean/Purge data and only check Hyper-V. This preserves old images and containers.

perrog avatar Apr 27 '21 08:04 perrog

Same is happening with me. And i have checked this command "DockerCli.exe -SwitchDaemon" . It doesn't help here.

aditi1230mhjn avatar Apr 27 '21 18:04 aditi1230mhjn

~Seems to be fixed in 20.10.6. I have not got this error after upgrading. Not sure what fixed it.~ Still have this error in 20.10.6

perrog avatar May 24 '21 09:05 perrog

Same here :|

ymauri avatar May 29 '21 22:05 ymauri

Same

mythjuha avatar Jul 06 '21 09:07 mythjuha

This helped me... thank you

sridharraoy avatar Jul 29 '21 20:07 sridharraoy

After look at %localappdata%\Docker\log.txt I saw:

[11:21:31.916][GoBackendProcess ][Error ] msg="parsing JSON from C:\Users\username\AppData\Roaming\Docker\settings.json: json: cannot unmarshal bool into Go struct field Content.proxyHttpMode of type string"

Then I changed Content.proxyHttpMode to: "proxyHttpMode":"false" and I saw:

[11:31:59.396][GoBackendProcess ][Info ] msg="starting backend server" [11:31:59.396][GoBackendProcess ][Info ] msg="migrate http proxy mode" [11:31:59.397][GoBackendProcess ][Fatal ] msg="error during migrations: proxyHttpMode must be a boolean value" [11:31:59.403][GoBackendProcess ][Error ] Process died

Then I removed Content.proxyHttpMode from C:\Users\username\AppData\Roaming\Docker\settings.json: json and the Docker Desktop starts

paulo3011 avatar Sep 26 '21 14:09 paulo3011

Issues go stale after 90 days of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30 days 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 Dec 25 '21 01:12 docker-robott

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

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

docker-robott avatar Feb 23 '22 03:02 docker-robott