Indestructible com.docker.db.exe - docker

I am running Docker on Windows 10 Pro. When I started Docker it told me there was an update so I told it to install and restart (Docker nor machine) then went to lunch.
When I cam e back the updated had failed with the following error:
Access to the path 'C:\Program Files\Docker\Docker\resources\com.docker.db.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at LightweightInstaller.UnpackArtifactsStep.<DoAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at LightweightInstaller.InstallWorkflow.<HandleD4WPackage>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown --
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at LightweightInstaller.InstallWorkflow.<ProcessAsync>d__18.MoveNext()
I traced the problem to the com.docker.db.exe file being in a strange state. Even as administrator I can not delete the file or see who owns it or any of the security settings.
I used FindLockingProcess.psm1 in power shell but that reported
PermissionDenied: (C:\Program File...m.docker.db.exe:String) [Test-Path], UnauthorizedAccessException
So I tried unlocker and that reported the file locked and unlocking it I was able to delete the file - apparently - it 'reappeared in the locked state!
I have performed a disk scan - no problems
Rebooted - same issue.
I just cant delete this file and docker will not reinstall so not able to work!
Its only the com.docker.db.exe that is the problem, been able to delete all other files.
Any ideas?

I have managed to delete the file. No idea what was going on.
To delete the file I rebooted into safe mode - pressing space while clicking restart.
This enabled me to delete the file and it not not reappear.
Boot to normal mode and Docker installed.

Related

Docker and Visual Studio for Mac: "PrepareForBuild": task failed... Permission denied

Visual Studio for Mac v17.0.6
MacOS Monterey v12.4
Docker v20.10.7
Docker Desktop v3.5.2
I am trying to run my project in a Docker container on my Mac using Visual Studio for Mac. At work, I run this on a Windows 10 machine without issue, and I did not set it up myself on my work machine so I am not sure if there are any steps or settings I'm missing.
What I have tried:
Adding /Users/Blake/Desktop/WOF/WOFFirebase to the list of file sharing paths as suggested by the troubleshooting link provided in the stack trace. I am not surprised this didn't work because the documentation says this is only for Visual Studio, not Visual Studio For Mac.
Restarting visual studio
Changing permissions to the WOF and WOFFirebase directories to be as permissive as possible.
I am wondering if I need to explicitly run this as the root user, but I am not sure how I would do that. What should I do next?
Please let me know if any more info is needed. Here is the full stack trace:
/Applications/Visual Studio.app/Contents/MonoBundle/AddIns/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(5,5): Error MSB4018: The "PrepareForBuild" task failed unexpectedly.
Microsoft.VisualStudio.Containers.Tools.Common.ContainerToolsException: An error occurred trying to start process '/Users/Blake/Desktop/WOF/WOFFirebase/docker' with working directory '/Users/Blake/Desktop/WOF/WOFFirebase'. Permission denied.
For more troubleshooting information, go to https://aka.ms/DockerToolsTroubleshooting
---> System.ComponentModel.Win32Exception (13): An error occurred trying to start process '/Users/Blake/Desktop/WOF/WOFFirebase/docker' with working directory '/Users/Blake/Desktop/WOF/WOFFirebase'. Permission denied
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.Docker.Utilities.CommandLineClient.<>c__DisplayClass0_0.<ExecuteAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.Docker.DockerClient.ExecuteAsync(CommandLineParameters cmdParameters, IDockerLogger logger, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.Docker.DockerClient.ExecuteAsync(CommandLineParameters cmdParameters, IDockerLogger logger, CancellationToken cancellationToken)
at Microsoft.Docker.DockerClientExtensions.GetServerOperatingSystemAsync(IDockerClient client, IDockerLogger logger, CancellationToken cancellationToken)
at Microsoft.Docker.Prerequisites.DockerTargetOSCheckPrerequisite.EvaluateAsync(CancellationToken cancellationToken)
at Microsoft.Docker.Prerequisites.DockerCompositePrerequisite.EvaluateAsync(CancellationToken cancellationToken)
at Microsoft.Docker.BuildTasks.DockerBuildTask.EvaluateBuildPrerequisitesAsync(Exception ex, DockerBuildTaskContext context)
at Microsoft.Docker.BuildTasks.DockerBuildTask.ExecuteAsync(DockerBuildTaskContext context)
at Microsoft.Docker.BuildTasks.DockerBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
Error code: DT1003
Severity: Error
Command line: docker version --format {{.Server.Os}}
(MSB4018) (docker-compose)

Docker desktop stopped in Windows container mode

I am using Docker Desktop latest version (4.7) on Windows 10 Pro machine. Everything was working fine before my first restart after installing docker and pulling a container in Windows Container mode which ran successfully as well.
But now whenever I run docker, then I see Desktop Docker stopped... after this exception is thrown:
System.Exception:
Paths contain symlinks
at Docker.Core.PermissionUtils.CheckPath(String path, Boolean allowDockerAppData) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 250
at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 46
at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
at Docker.Backend.HttpAPI.WindowsContainersController.FixPermissions(String path) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 72
at Docker.Backend.HttpAPI.WindowsContainersController.Start(WindowsContainerStartRequest request) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 35
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__0(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
I have tried various solutions such as disabling WSL, deleting settings.json, entire docker folders in AppData, running Docker with admin rights but nothing works. Docker works fine in Linux Container mode but when I switch to Windows container mode the above exception hits and docker stops working.
Any help would be greatly appreciated. Thanks.
It's a known issue - see https://github.com/docker/for-win/issues/12650.
You may have to remove symlinks.

Docker desktop System.InvalidOperationException Failed to deploy distro docker-desktop

Docker was working fine until later last week, then I began getting this error popping up.
System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\SLynch24\AppData\Local\Docker\wsl\distro: exit code: -1
stdout: {Application Error}
The exception s (0x
stderr:
at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 146
at Docker.Engines.WSL2.WSL2Provisioning.<DeployDistroAsync>d__17.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\WSL2Provisioning.cs:line 168
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\WSL2Provisioning.cs:line 77
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__29.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 190
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.EngineStateMachine.<StartAsync>d__14.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 69
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.Engines.<StartAsync>d__21.MoveNext() in C:\workspaces\master-merge\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 99"
I followed this users thread but still have the same issue.
If you utilize WSL for other purposes as well. In that case, you may have several configurations/apps in WSL and just reinstalling or deleting your configuration will probably be a bad solution.
Furthermore: WSL is not the issue for this error! It is created by Docker engine configuration which will kill the WSL service (LxxsManager). This may happen because of
changed configuration (by you) or
because of a Docker update, maybe also
because of Windows updates
You can find a detailed discussion about this issue on Docker's GitHub Issues.
I experienced this problem after installing updates on Windows while running Docker v3.5.2. And again, reinstalling/killing WSL is not an option for me! So I tried to kill all services (Docker and WSL) and update Docker. Unfortunately, that did not work in the first place, since LxxsManager was in some weird state and I could not even kill it anymore (even a kill command as admin with force switch did not do its job!)... So here is my solution to fix that problem:
Remove Docker from autostart
Restart Windows
Install a new version of Docker (in my case v.4.2.0)
Restart Windows again (probably not necessary, but for me, it was because the Docker engine did not start before a Windows restart)
Start Docker
Note: Since I did not change the Docker configuration, I installed an update. If you changed configuration options resulting in that crash, your solution may be different. Literally, instead of updating Docker (step 3), you would probably roll back your Docker configuration changes instead.
Make sure this service is enable LxssManager. If not, try this command:
List item open cmd in administrator
sc config LxssManager start=auto

Docker Windows Installation Failed / Library not registered [Windows 10 Pro]

I am trying to install Docker for Windows 10 Pro. I have downloaded the Docker Desktop Installer.exe and when I run it with Administrator role I got the follwing error when it starts the installation, just after downloading and unpackaging the files.
Installation failed
Library not registered.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.RefreshCache()
at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit()
at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue)
at System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, String identityValue)
at CommunityInstaller.CreateGroupAction.<DoAsync>b__33_0()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CommunityInstaller.InstallWorkflow.<ProcessAsync>d__24.MoveNext(
I have changed my Windows user Group to Administrators and I also updated Windows 10.
Any help would be appreciated
Regards

Docker installation on Windows 10

I am trying to install Docker on Windows 10 Enterprise Edition but got following exception.
Installation failed
The Server service is not started.
at System.DirectoryServices.DirectoryEntry.RefreshCache()
at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit()
at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue)
at System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, String identityValue)
at CommunityInstaller.CreateGroupAction.<DoAsync>b__33_0()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CommunityInstaller.InstallWorkflow.<ProcessAsync>d__24.MoveNext()
Please help me on this. Thanks
you have to go to services app and start server service if it disabled like the pic
you should start by double click on server service and choose automatic and press okay
and it will work with u
There can be any issues.
One issue could because the windows service Server was disabled.
FIX: Enable it and start on Service App.

Resources