docker 异常退出
A few days ago I noticed that Docker Desktop wasn’t running on my workstation. Each time I started it up, it would briefly show up in the system tray and then disappear.
几天前,我注意到Docker Desktop没有在我的工作站上运行。 每次启动时,它都会短暂出现在系统托盘中,然后消失。
I couldn’t find the cause of the issue from the log at %USERPROFILE%\AppData\Local\Docker\Log.txt
我在%USERPROFILE%\AppData\Local\Docker\Log.txt的日志中找不到问题的原因
I eventually found the error in the Windows Event Viewer Application logs.
我最终在Windows Event Viewer应用程序日志中发现了错误。
Here’s the first error
这是第一个错误
Application: Docker Desktop.exeFramework Version: v4.0.30319Description: The process was terminated due to an unhandled exception.Exception Info: System.NullReferenceException at Docker.ApiServices.ClientConfig.DockerLoginSync.CredentialChanged(System.String, Docker.Core.Credential) at Docker.ApiServices.Registries.DockerHub+<FinalizeLogin>d__20.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) at Docker.ApiServices.Registries.DockerHub+<LogIn>d__17.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) at Docker.ApiServices.Registries.DockerHub+<AutoLogIn>d__16.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()Followed by the next error in the Event Viewer:
随后是事件查看器中的下一个错误:
Faulting application name: Docker Desktop.exe, version: 2.3.0.48029, time stamp: 0xfc444d22Faulting module name: KERNELBASE.dll, version: 10.0.18362.1049, time stamp: 0x1b835a75Exception code: 0xe0434352Fault offset: 0x0000000000043b29Faulting process id: 0x3058Faulting application start time: 0x01d68d0782386b7aFaulting application path: C:\Program Files\Docker\Docker\Docker Desktop.exeFaulting module path: C:\WINDOWS\System32\KERNELBASE.dllReport Id: a504dea5–47c0–4d2c-a4e8–1d424d7d1297Faulting package full name: Faulting package-relative application ID:Looking at the error gave me the impression that it had something to do with changed credentials. I didn’t change my password recently however.
查看错误给我的印象是它与更改的凭据有关。 我最近没有更改密码。
Doing a Google Search didn’t provide any solutions, so I ended up digging through the issues in the GitHub page of Docker Desktop for Windows.
进行Google搜索并没有提供任何解决方案,因此我最终在Docker Desktop for Windows的GitHub页面中研究了问题。
I noticed that a few others had experienced the same issue which is caused by a corrupt configuration file at %USERPROFILE%\.docker\config.json .
我注意到其他一些人也遇到了相同的问题,这是由于%USERPROFILE%\.docker\config.json配置文件损坏引起的。
To fix the issue all you need to do is delete the corrupt file %USERPROFILE%\.docker\config.json and start Docker Desktop, which will recreate the file.
要解决此问题,您需要做的就是删除损坏的文件%USERPROFILE%\.docker\config.json并启动Docker Desktop,它将重新创建该文件。
Following these steps fixed my issue and my Docker is happily floating along again.
按照这些步骤解决了我的问题,而我的Docker再次愉快地漂浮着。
翻译自: https://medium.com/@jairajbudhu/docker-desktop-error-and-crash-during-startup-unhandled-exception-system-null-reference-exception-98f2d137163a
docker 异常退出
