Docker failed to initialize.Operation timed out

After Docker desktop Update or Download the latest version for windows 10, docker can’t start i am getting this error message

in console show me this error
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: El sistema no puede encontrar el archivo especificado.

Most probably this due to switching between Linux and windows containers.
Try “C:\Program Files\Docker\Docker\DockerCli.exe” -SwitchDaemon in cmd
or & ‘C:\Program Files\Docker\Docker\DockerCli.exe’ -SwitchDaemon in powershell

HI! thanks for the suggestion! I solved this by erasing some folders of docker in C:\Users\nameUser\AppData\Roaming\Docker Desktop…

Can you please explain

I solved it by deleting these three folders:
C:\Users[USER]\AppData\Local\Docker
C:\Users[USER]\AppData\Roaming\Docker
C:\Users[USER]\AppData\Roaming\Docker Desktop

Once deleted, I didn’t have to do anything else, Docker Desktop started booting up as normal. Note, that I have Docker Desktop configured to run on startup. If you don’t have this set, you may need to manually run Docker Desktop after deleting these directories.

6 Likes

this is a good find. this worked for me but I would have never thought to try this.

great, that works also to me like a charm.

As suggested by @Bryan, Its working now after deleting those folders. Thanks.

Why do we need to delete it, anybody any idea?

Thanks man… it worked :slight_smile:

Worked for me. Thank you!!

That works also to me!!

Thank you so much @schmidty . It worked for me.

Hi there,
I think I found a more precise/surgical solution for this problem.
Thanks to @schmidty suggestion I opened my %localappdata%\Docker folder and found some log files;

The most recent reported

[GoBackendProcess  ][Error  ] msg="unable to parse C:\\Users\\...\\AppData\\Roaming\\Docker\\settings.json: while parsing JSON from C:\\Users\\...\\AppData\\Roaming\\Docker\\settings.json: invalid character '\\x00' looking for beginning of value"

In fact %appdata%\Docker\settings.json was unreadable!

It was enough to delete that file to make docker desktop start again.

4 Likes

In fact %appdata%\Docker\settings.json was unreadable!

It was enough to delete that file to make docker desktop start again.

Worked for me! Thanks! (3.6.0)

Found the settings file in %appdata%\Roaming\Docker\

This also worked for me. For consistency, I’d also like to indicate that upon deleting this file and then starting Docker Desktop (for Windows; I am running Win10Education), it acted as if this was the first time I’d started Docker Desktop, including asking for permission to start as admin. I was only hit with this settings.json roadblock after I installed Docker Desktop 3.6.0 from… I think it was 3.4.0 but I really am not sure. If anyone knows how to find that, I’d add it to my post for future reference. Thanks @sanzoghenzo :slight_smile: you rule!

(For clarity, my file was in %appdata%\Docker\settings.json and not %appdata%\Roaming\settings.json, but both files do exist on my system, and deleting the former solved my problem (latter inconclusive).

I would advise the sanzoghenzo approach against this issue if you are a regular docker/wsl2 user, because it looked like the ext4 filesystem for my wsl2 system was stored in one of the directories mentioned in schmidty’s post which would have gotten wiped out if I’d trusted those instructions. :face_with_head_bandage: save yourself a headache.

Thank you for this fix. You got me out of a major jam!