Docker Fails to Start/Unable to write to the Database
Expected behavior
Docker Startup
Actual behavior
Docker Fails with error:
Unable to write to the database. Exit code: 1
at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings)
at Docker.Backend.ContainerEngine.Linux.Restart(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.
Information
- Diagnostic ID: 53C4B077-9C84-4132-A5B9-FCC5A51C883C/2017-06-29_17-15-48
- Windows 10 Pro
Steps to reproduce the behavior
- Open Docker or Restart Docker
Hi @Pirion This is due to a recent issue we discovered with the way we read computer names on startup, if your computer name is longer than 12 characters Docker will fail. We are working on it, but I don't have a specific timeframe for the fix. If you're able to - shorten your computer name and that should take care of it.
Here is the error from the logs:
[16:55:47.956][NamedPipeServer][Error ] Unable to execute Restart: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The computer 'KAINE-ADAMS-HOM' could not be resolved. Make sure you typed the machine name correctly and that you have network access.
at New-MobyLinuxVM,
Thanks @jasonbivins - I've renamed the machine to 11 characters, however looks like startup is still having some of the same errors.
I updated to the edge version since the error and last attempt was logged as: 53C4B077-9C84-4132-A5B9-FCC5A51C883C/2017-06-30_10-52-50
@Pirion Can you use the Reset feature under settings in the Gui and try again?
I’m afraid still looks the same.
New Log: 53C4B077-9C84-4132-A5B9-FCC5A51C883C/2017-06-30_11-12-18
From: Jason Bivins [mailto:[email protected]] Sent: Friday, June 30, 2017 10:47 AM To: docker/for-win [email protected] Cc: Pirion [email protected]; Mention [email protected] Subject: Re: [docker/for-win] Docker Fails to Start/Unable to write to the Database (#871)
Hi @Pirion https://github.com/pirion This is due to a recent issue we discovered with the way we read computer names on startup, if your computer name is longer than 12 characters Docker will fail. We are working on it, but I don't have a specific timeframe for the fix. If you're able to - shorten your computer name and that should take care of it.
Here is the error from the logs:
[16:55:47.956][NamedPipeServer][Error ] Unable to execute Restart: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The computer 'KAINE-ADAMS-HOM' could not be resolved. Make sure you typed the machine name correctly and that you have network access. at New-MobyLinuxVM, : line 222
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/docker/for-win/issues/871#issuecomment-312302978 , or mute the thread https://github.com/notifications/unsubscribe-auth/AH2o-jsUO5cX1oUyFDmtzB3PnOlrC3OPks5sJRhYgaJpZM4OJ7-u . https://github.com/notifications/beacon/AH2o-mv5qPwCljcowSOQud5QTP2kcwg6ks5sJRhYgaJpZM4OJ7-u.gif
Hi @Pirion I don't see the Hostname error - but now I only see Uncaught exception errors. What is your computer name currently set ot?
Let's completely remove docker - then try to reinstall - this is the script I use in testing when I want to completely wipe docker from my system: $ErrorActionPreference = "SilentlyContinue"
kill -force -processname 'Docker for Windows', com.docker.db, vpnkit, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd
try { ./MobyLinux.ps1 -Destroy } Catch {}
$service = Get-WmiObject -Class Win32_Service -Filter "Name='com.docker.service'" if ($service) { $service.StopService() } if ($service) { $service.Delete() } Start-Sleep -s 5 Remove-Item -Recurse -Force "~/AppData/Local/Docker" Remove-Item -Recurse -Force "~/AppData/Roaming/Docker" if (Test-Path "C:\ProgramData\Docker") { takeown.exe /F "C:\ProgramData\Docker" /R /A /D Y } if (Test-Path "C:\ProgramData\Docker") { icacls "C:\ProgramData\Docker" /T /C /grant Administrators:F } Remove-Item -Recurse -Force "C:\ProgramData\Docker" Remove-Item -Recurse -Force "C:\Program Files\Docker" Remove-Item -Recurse -Force "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Docker" Remove-Item -Force "C:\Users\Public\Desktop\Docker for Windows.lnk" Get-ChildItem HKLM:\software\microsoft\windows\currentversion\uninstall | % {Get-ItemProperty $.PSPath} | ? { $.DisplayName -eq "Docker" } | Remove-Item -Recurse -Force Get-ChildItem HKLM:\software\classes\installer\products | % {Get-ItemProperty $.pspath} | ? { $.ProductName -eq "Docker" } | Remove-Item -Recurse -Force Get-Item 'HKLM:\software\Docker Inc.' | Remove-Item -Recurse -Force Get-ItemProperty HKCU:\software\microsoft\windows\currentversion\Run -name "Docker for Windows" | Remove-Item -Recurse -Force #Get-ItemProperty HKCU:\software\microsoft\windows\currentversion\UFH\SHC | ForEach-Object {Get-ItemProperty $.PSPath} | Where-Object { $.ToString().Contains("Docker for Windows.exe") } | Remove-Item -Recurse -Force $.PSPath #Get-ItemProperty HKCU:\software\microsoft\windows\currentversion\UFH\SHC | Where-Object { $(Get-ItemPropertyValue $) -Contains "Docker" }
I've removed/ran the script and installed the new version. No change in behavior.
New Name is PIRION-HOME.
53C4B077-9C84-4132-A5B9-FCC5A51C883C/2017-06-30_14-50-23
MY computer name is 9 characters and docker crashes on load. See 52F7C608-A276-4EFF-96B7-481E6E6473FE/2017-07-03_20-24-12
Hello,
I have the very same issue when switching to Linux Containers on Windows 2016
This is the log:
[10:09:16.946][HyperVGuids ][Info ] GUIDs removed
[10:09:17.134][NamedPipeServer][Error ] Unable to execute Start: Unable to write to the database. Exit code: 1 at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:line 247
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:line 123
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.
Please help!
My computer name has 15 characters, however changing to less than 12 does not work.
Thank you.
I the length-of-name problem likely to be fixed?
the latest version of Docker for Windows no longer use the database. Closing
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