docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.85k stars 287 forks source link

Docker desktop will not start on Windows 10 Enterprise - app initialization failed: creating "rootNode" subnodes: constructing "BackendServices" in "rootNode" #13178

Open GlynJagger opened 1 year ago

GlynJagger commented 1 year ago

Diagnostics look to have failed to upload as I see panic: runtime error: invalid memory address or nil pointer dereference in the output.

Actual behavior

Docker desktop will not start. A message box pops up with the message, "creating "rootNode" subnodes: constructing "BackendServices" in "rootNode": doing migrations: migrating features.json: invalid character '\x00' looking for beginning of value"

Expected behavior

Docker desktop launches.

Information

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

Creation failed

C:\>"C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" gather
[2023-01-19T09:25:01.583517000Z][com.docker.diagnose.exe][I] set path configuration to OnHost
Gathering diagnostics for ID 28FE6492-9F00-4E99-BD64-27AC9B838E8E/20230119092501 into C:\Users\GLYNJA~1\AppData\Local\Temp\28FE6492-9F00-4E99-BD64-27AC9B838E8E\20230119092501.zip.
This may take up to 15 minutes.
time="2023-01-19T09:25:01Z" level=info msg="Triggering Linux sysrq and log flushes via a unix socket: \\\\.\\pipe\\dockerDiagnosticd" type=unixsock
time="2023-01-19T09:25:01Z" level=warning msg="/flush failed: Post \"http://unix/flush\": open \\\\.\\pipe\\dockerDiagnosticd: The system cannot find the file specified." type=unixsock
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x1c1 pc=0x11c6f11]

goroutine 38 [running]:
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.findStringInKMSG({0x1486828?, 0x1?})
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/vm.go:54 +0x51
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.vmStartWorks()
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/vm.go:40 +0x25
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.(*test).GetResult(0x191a2c0)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/test.go:46 +0x43
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.Run.func1(0x191a2c0)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:17 +0x5a
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkOnce.func1(0x6?, 0x191a2c0)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:142 +0x77
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x5, 0x191a2c0, 0xc00011fab8)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:151 +0x87
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x4, 0x191a340, 0xc00011fab8)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:148 +0x52
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x3, 0x191a440, 0xc00011fab8)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:148 +0x52
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x2, 0x191a4c0, 0xc00011fab8)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:148 +0x52
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x1, 0x191a540, 0xc00011fab8)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:148 +0x52
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x0, 0x191acc0, 0xc00011fab8)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:148 +0x52
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.walkOnce(0x12ae880?, 0xc000555c20)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:137 +0xcc
github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.Run(0x191acc0, 0x0?, {0x0, 0x0, 0x0})
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose/run.go:16 +0x1d4
github.com/docker/pinata/common/pkg/diagkit/gather.(*SelfDiagnose).Trigger(0x1927ca0)
        github.com/docker/pinata/common/pkg/diagkit/gather/diagnose.go:32 +0x6e
created by main.gatherCmd
        github.com/docker/pinata/common/cmd/com.docker.diagnose/main.go:267 +0x9bf

Steps to reproduce the behavior

Try and launch Docker Desktop from the icon on the Windows Desktop.

JoshMart commented 1 year ago

[2023-01-23T15:59:10.717419000Z][com.docker.diagnose.exe][I] set path configuration to OnHost Gathering diagnostics for ID 093478E6-F230-471B-96A9-AA0BC0EE0A8A/20230123155910 into C:\Users\JOSH~1.MAR\AppData\Local\Temp\093478E6-F230-471B-96A9-AA0BC0EE0A8A\20230123155910.zip. This may take up to 15 minutes. time="2023-01-23T08:59:10-07:00" level=info msg="Triggering Linux sysrq and log flushes via a unix socket: \\.\pipe\dockerDiagnosticd" type=unixsock time="2023-01-23T08:59:10-07:00" level=warning msg="/flush failed: Post \"http://unix/flush\": open \\.\pipe\dockerDiagnosticd: The system cannot find the file specified." type=unixsock panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x1c9 pc=0xd2f371]

Used Docker all day on Friday, turned on my computer on Monday. Between Friday and today nothing abnormal happened as far as Windows shutting down and Windows starting up.

mihailtd commented 1 year ago

For me, uninstalling and reinstalling Docker fixed the issue. I did not delete anything from docker's folders (in App Data and such) , and I did not loose any data, not even containers.

JoshMart commented 1 year ago

Just tried an uninstall and a reinstall and that did not fix it. Now the error message is different and says: Creating "rootNode" subnodes: constructing "BackendServices" in "rootNode": writing locks to lock-directories: reading <path to AppData\Roaming\Docker\locked-directories: parsing JSON: invalid character

image

VitorAlho commented 1 year ago

Just tried an uninstall and a reinstall and that did not fix it. Now the error message is different and says: Creating "rootNode" subnodes: constructing "BackendServices" in "rootNode": writing locks to lock-directories: reading <path to AppData\Roaming\Docker\locked-directories: parsing JSON: invalid character

image

I'm exactly with the same problem. I've tried to uninstall, remove my user .docker folder and reboot, same problem

[SOLVED] - Delete "C:\Users\vitor.alho\AppData\Roaming\Docker\locked-directories"; open Docker Desktop and it will raise an error, but it will create a new locked-directories; open Docker Desktop again and it worked here.

JoshMart commented 1 year ago

Just tried an uninstall and a reinstall and that did not fix it. Now the error message is different and says: Creating "rootNode" subnodes: constructing "BackendServices" in "rootNode": writing locks to lock-directories: reading <path to AppData\Roaming\Docker\locked-directories: parsing JSON: invalid character image

I'm exactly with the same problem. I've tried to uninstall, remove my user .docker folder and reboot, same problem

[SOLVED] - Delete "C:\Users\vitor.alho\AppData\Roaming\Docker\locked-directories"; open Docker Desktop and it will raise an error, but it will create a new locked-directories; open Docker Desktop again and it worked here.

I can confirm what solved the new error of writing locks to locked-directories for me was deleting the locked-directories file. Went through the same initializations errors after that, but opening multiple times cleared those errors and I was finally able to get Docker running again.

minhbear commented 1 year ago

To solve this issue, you need to go to "C/profileName/AppData/Roaming/Docker" and delete "locked-directories". After that restart your docker and is work

GlynJagger commented 1 year ago

Revert to 4.13.1 that my colleague was using was the only thing that worked for me. I've since tried an upgrade to 4.16.3 and end up with the same issue. Again a revert to 4.13.1 gets me back into a position where Docker Desktop works again.

RenanGalvao commented 1 year ago

Revert to 4.13.1 that my colleague was using was the only thing that worked for me. I've since tried an upgrade to 4.16.3 and end up with the same issue. Again a revert to 4.13.1 gets me back into a position where Docker Desktop works again.

Worked for me. Using Windows 10.0.19045.2546.

stampycode commented 1 year ago

Try deleting this file: C:\Users\<user>\.docker\features.json

csteeg commented 1 year ago

Try deleting this file: C:\Users\<user>\.docker\features.json

Thank you @stampycode that worked for me

Malkiz223 commented 1 year ago

Deleting the file helped me - C:\Users\<user>\AppData\Roaming\Docker\settings.json

This file had a long list of NaN NaN The problem itself appeared due to an emergency restart of Windows.

SushilkantWakekar commented 1 year ago

After deleting features.json file from C:\Users\Username\.docker\features.json docker desktop started .

stevefan1999-personal commented 1 year ago

If you have this issue I'm pretty sure 99% you are having a BSOD on Docker Desktop startup. This is due to Windows File IO not fully committed when saving the files which means the actual data is kept in buffer and is lost forever due to the BSOD. Any file that was open could potentially be corrupted this way. Try truncate any files that you see damaged.

mawilson1234 commented 1 year ago

Deleting config.json and locked-directories didn't work for me, but deleting locked-directories and the entire C:\Users\<username>\.docker directory did. Pretty sure it was caused by a recent BSOD in my case (though I wasn't using Docker at the time, so who knows?).

gelusus commented 1 year ago

To solve this issue, you need to go to "C/profileName/AppData/Roaming/Docker" and delete "locked-directories". After that restart your docker and is work

  • If you do not see AppData, go to view and click show hidden folder

It work for me.

Geczy commented 1 year ago

Deleting the file helped me - C:\Users\<user>\AppData\Roaming\Docker\settings.json

This file had a long list of NaN NaN The problem itself appeared due to an emergency restart of Windows.

this is what worked for me

leo-kor commented 1 year ago

In my case, I deleted the file: "C:\Users{your_name_here}.docker\scan\config.json"

The Docker Desktop application launched successfully and created this file from scratch.

JaggarYussef commented 11 months ago

I had an identical error that was mentioning feature.json which was located in ..\user\.docker\. After deleting this JSON file I was able launch Docker Desktop again.