Unable to write to the database. Exit code: 1

Expected behavior

Docker starts up after install.

Actual behavior

During docker startup I am getting the “Unable to write to the database. Exit 1” error

Information

  • the output of:
    • Moby Notification > Diagose & Feedback on Windows
      A diagnostic was uploaded with id: 3523E48C-FDC1-474F-B996-936E568F2394/2016-07-14_08-37-32
  • Windows 10 Pro Insider preview fast lane latest. Build 14372

Steps to reproduce the behavior

  1. Start Docker
  2. See the startup error

Logs

`[08:29:08.648][Program ][Info ] 1.12.0-rc3-beta18
[08:29:08.654][Program ][Info ] Starting on: 7/14/2016 8:29:08 AM
[08:29:08.659][Program ][Info ] Resources: C:\Program Files\Docker\Docker\Resources
[08:29:08.665][Program ][Info ] OS: Windows 10 Pro Insider Preview
[08:29:08.670][Program ][Info ] Edition: Professional
[08:29:08.676][Program ][Info ] Id: 1607
[08:29:08.680][Program ][Info ] Build: 14372
[08:29:08.683][Program ][Info ] BuildLabName: 14372.0.amd64fre.rs1_release.160620-2342
[08:29:08.688][Program ][Info ] Mixpanel Id: 3523E48C-FDC1-474F-B996-936E568F2394
[08:29:08.707][Program ][Info ] Sha1: ec40b14c72adc0bff3b01fa8886dae7f2eee1541
[08:29:08.711][Program ][Info ] You can send feedback, including this log file, at https://forums.docker.com/c/docker-for-windows
[08:29:09.032][TrackingStatus ][Info ] Crash report and usage statistics are enabled
[08:29:09.922][Mixpanel ][Info ] Usage Statistic: appLaunched
[08:29:10.146][NamedPipeClient][Info ] Sending Version()…
[08:29:10.166][NamedPipeClient][Info ] Received response for Version
[08:29:10.173][Mixpanel ][Info ] Usage Statistic: heartbeat
[08:29:05.165][BackendServer ][Info ] Started
[08:29:10.157][NamedPipeServer][Info ] Version()
[08:29:10.161][NamedPipeServer][Info ] Version done.
[08:29:10.410][Notifications ][Info ] Docker is starting…
[08:29:10.414][Updater ][Info ] Checking for updates on channel Beta…
[08:29:10.431][NamedPipeClient][Info ] Sending Stop()…
[08:29:10.436][NamedPipeServer][Info ] Stop()
[08:29:10.443][HyperV ][Info ] Stop
[08:29:10.456][PowerShell ][Info ] Run script with parameters: -Stop True…
[08:29:10.521][Updater ][Info ] Local build 5226 is as good as the remote 5226 on channel Beta
[08:29:15.037][HyperV ][Info ] VM MobyLinuxVM is stopped
[08:29:15.051][NamedPipeClient][Info ] Received response for Stop
[08:29:15.047][NamedPipeServer][Info ] Stop done.
[08:29:15.921][NamedPipeClient][Info ] Sending Start(Docker.Core.Settings)…
[08:29:15.930][NamedPipeServer][Info ] Start(Docker.Core.Settings)
[08:29:15.934][HyperVGuids ][Info ] Installing GUIDs…
[08:29:15.939][HyperVGuids ][Info ] GUIDs installed
[08:29:15.948][Firewall ][Info ] Opening ports for C:\Program Files\Docker\Docker\Resources\com.docker.proxy.exe…
[08:29:18.031][Firewall ][Info ] Ports are opened
[08:29:18.039][HyperV ][Info ] Create
[08:29:18.045][PowerShell ][Info ] Run script with parameters: -Create True -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 24 -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\mobylinux.iso…
[08:29:18.310][HyperV ][Info ] Using existing Switch: DockerNAT
[08:29:18.848][HyperV ][Info ] Using existing Switch IP address
[08:29:20.035][HyperV ][Info ] Using existing: MobyLinuxVM
[08:29:20.188][HyperV ][Info ] Setting MobyLinuxVM vm CPUs to 2 and Memory to 2048 MB
[08:29:20.206][ProxyProcess ][Info ] Starting…
[08:29:20.211][PowerShell ][Info ] Run script…
[08:29:20.262][ProxyProcess ][Info ] Started
[08:29:20.273][Database ][Info ] Removing com.docker.driver.amd64-linux/proxy/exclude
[08:29:20.279][Database ][Info ] Removing com.docker.driver.amd64-linux/proxy/http
[08:29:20.283][Database ][Info ] Removing com.docker.driver.amd64-linux/proxy/https
[08:29:20.311][ProxyProcess ][Info ] Start com.docker.db.exe --git C:\ProgramData\Docker\database --url hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7,\.\pipe\dockerDataBase --color never
[08:29:20.318][ProxyProcess ][Info ] Start com.docker.slirp.exe --ethernet hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7 --dns 10.0.75.1 --port hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7 --debug
[08:29:20.328][ProxyProcess ][Info ] docker proxy (on deprecated port): ready
[08:29:20.339][ProxyProcess ][Info ] poison pill com.docker.service
[08:29:20.340][ProxyProcess ][Info ] com.docker.slirp.exe: using DNS forwarder on 10.0.75.1:53
[08:29:20.355][ProxyProcess ][Info ] com.docker.slirp.exe: starting port_forwarding port_control_url:hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7
[08:29:20.360][ProxyProcess ][Info ] com.docker.slirp.exe: connecting to 4a9981f1-a112-4dc2-8d05-70a3370e5af7:0B95756A-9985-48AD-9470-78E060895BE7
[08:29:20.367][ProxyProcess ][Debug ] com.docker.slirp.exe: Waiting for connections on socket hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7
[08:29:20.374][ProxyProcess ][Warning] com.docker.slirp.exe: no database: using hardcoded network configuration values
[08:29:20.346][ProxyProcess ][Info ]
[08:29:20.385][ProxyProcess ][Info ] +000us Datakit Starting com.docker.db…
[08:29:20.374][ProxyProcess ][Info ] Restarting…
[08:29:20.380][ProxyProcess ][Info ] com.docker.slirp.exe: connecting to 4a9981f1-a112-4dc2-8d05-70a3370e5af7:30D48B34-7D27-4B0B-AAAF-BBBED334DD59
[08:29:20.390][ProxyProcess ][Info ] dns server: ready
[08:29:20.402][ProxyProcess ][Debug ] com.docker.slirp.exe: Waiting for connections on socket hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7
[08:29:20.408][ProxyProcess ][Info ] docker proxy: ready
[08:29:20.420][ProxyProcess ][Info ] open //./pipe/docker_engine: Access is denied.
[08:29:20.562][Database ][Info ] Successfully removed 3 value(s)
[08:29:20.563][ProxyProcess ][Info ]
[08:29:20.571][ProxyProcess ][Info ] +000us fs9p [ERROR] dispatcher caught Unix.Unix_error(Unix.EPIPE, “bytes_read”, “”): no more requests will be handled
[08:29:20.570][Database ][Info ] Writing com.docker.driver.amd64-linux/net/config=static
[08:29:20.580][Database ][Info ] Writing com.docker.driver.amd64-linux/net/address=10.0.75.2
[08:29:20.584][Database ][Info ] Writing com.docker.driver.amd64-linux/net/netmask=255.255.255.0
[08:29:20.587][Database ][Info ] Writing com.docker.driver.amd64-linux/net/gateway=10.0.75.1
[08:29:20.591][Database ][Info ] Writing com.docker.driver.amd64-linux/etc/resolv.conf=nameserver 10.0.75.1
[08:29:20.595][Database ][Info ] Writing com.docker.driver.amd64-linux/network=hybrid
[08:29:20.600][Database ][Info ] Writing com.docker.driver.amd64-linux/etc/docker/daemon.json={“registry-mirrors”:[],“insecure-registries”:[],“debug”:false}
[08:29:20.601][ProxyProcess ][Info ] Killing existing process with PID 7728
[08:29:20.605][Database ][Info ] Writing com.docker.driver.amd64-linux/etc/sysctl.conf=
[08:29:20.616][Database ][Info ] Writing com.docker.driver.amd64-linux/native/port-forwarding=true
[08:29:20.613][ProxyProcess ][Info ] Killing existing process with PID 8168
[08:29:20.626][PowerShell ][Info ] Run script…
[08:29:20.663][ProxyProcess ][Info ] Restarted
[08:29:20.723][ProxyProcess ][Info ] Start com.docker.db.exe --git C:\ProgramData\Docker\database --url hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7,\.\pipe\dockerDataBase --color never
[08:29:20.730][ProxyProcess ][Info ] Start com.docker.slirp.exe --ethernet hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7 --dns 10.0.75.1 --port hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7 --debug
[08:29:20.736][ProxyProcess ][Info ] docker proxy (on deprecated port): ready
[08:29:20.743][ProxyProcess ][Info ] poison pill com.docker.service
[08:29:20.759][ProxyProcess ][Info ]
[08:29:20.765][ProxyProcess ][Info ] +000us Datakit Starting com.docker.db…
[08:29:20.772][ProxyProcess ][Info ] dns server: ready
[08:29:20.779][ProxyProcess ][Info ] docker proxy: ready
[08:29:20.785][ProxyProcess ][Info ] open //./pipe/docker_engine: Access is denied.
[08:29:20.780][ProxyProcess ][Info ] com.docker.slirp.exe: using DNS forwarder on 10.0.75.1:53
[08:29:20.802][ProxyProcess ][Info ] com.docker.slirp.exe: starting port_forwarding port_control_url:hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7
[08:29:20.808][ProxyProcess ][Info ] com.docker.slirp.exe: connecting to 4a9981f1-a112-4dc2-8d05-70a3370e5af7:0B95756A-9985-48AD-9470-78E060895BE7
[08:29:20.802][ProxyProcess ][Info ] Restarting…
[08:29:20.817][ProxyProcess ][Debug ] com.docker.slirp.exe: Waiting for connections on socket hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7
[08:29:20.830][ProxyProcess ][Warning] com.docker.slirp.exe: no database: using hardcoded network configuration values
[08:29:20.839][ProxyProcess ][Info ] com.docker.slirp.exe: connecting to 4a9981f1-a112-4dc2-8d05-70a3370e5af7:30D48B34-7D27-4B0B-AAAF-BBBED334DD59
[08:29:20.845][ProxyProcess ][Debug ] com.docker.slirp.exe: Waiting for connections on socket hyperv-connect://4a9981f1-a112-4dc2-8d05-70a3370e5af7
[08:29:21.034][ProxyProcess ][Info ] Killing existing process with PID 8552
[08:29:21.072][ProxyProcess ][Info ] Killing existing process with PID 8544
[08:29:21.087][PowerShell ][Info ] Run script…
[08:29:21.117][Database ][Error ] 2016/07/14 08:29:20 Retry dialing \.\pipe\dockerDataBase in 100ms
2016/07/14 08:29:20 Retry dialing \.\pipe\dockerDataBase in 100ms
2016/07/14 08:29:21 fatal error reading msg: EOF
2016/07/14 08:29:21 exited read loop
2016/07/14 08:29:21 Failed to clunk fid 126
2016/07/14 08:29:21 Failed to Walk to 9pdb closed
2016/07/14 08:29:21 Failed to clunk fid 127
2016/07/14 08:29:21 Failed to Mkdir [branch master transactions 9pdb rw com.docker.driver.amd64-linux net]
2016/07/14 08:29:21 Failed to clone root fid closed
2016/07/14 08:29:21 Failed to Create [branch master transactions 9pdb rw com.docker.driver.amd64-linux net config]
2016/07/14 08:29:21 exited handle loop
2016/07/14 08:29:21 Failed to write com.docker.driver.amd64-linux/net/config = static: &errors.errorString{s:“closed”}

[08:29:21.129][Database ][Error ] Unable to write to the database: Unable to write to the database. Exit code: 1. Let’s retry in 1s
[08:29:21.157][ProxyProcess ][Info ] Restarted`

Hi

could you try updating to the latest Beta (release earlier this week). While we were un-able to reproduce the error on any of our machines we made some change which are related to your error.

Thanks
Rolf

I am having the same problem.

Oracle VirtualBox
Windows 10 Enterprise 64-bit
Windows 7 Host

Unable to remove from the database. Exit code: 1
at Docker.Core.Pipe.NamedPipeClient.TrySend(String action, Object[] parameters)
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
at Docker.Core.Backend.BackendClient.Start(Settings settings)
at Docker.Actions.DoStart(Settings settings, Boolean showWelcomeWindow)
at Docker.Core.TaskQueue.<.ctor>b__16_0()

Still fails with latest
Unable to remove from the database. Exit code: 1
at Docker.Core.Pipe.NamedPipeClient.TrySend(String action, Object[] parameters)
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
at Docker.Core.Backend.BackendClient.Start(Settings settings)
at Docker.Actions.DoStart(Settings settings, Boolean showWelcomeWindow)
at Docker.Core.TaskQueue.<.ctor>b__16_0()

Any guidance on how to troubleshoot ?

If you guys want me to run some kind of a diagnostics tool to triage let me know.

Same error here

Bugsnag report c4a339e7-7689-4df4-ac5b-5767aed3f3cc

Same error.

I use Azure Virtual machine with “Visual Studio Community 2015 with Universal Windows Tools and Azure SDK 2.9 on Windows 10 Enterprise N (x64)” image.

Thanks

I am having the same problem with Windows 10 in a physical machine (No VM).

Edition: Windows 10 Enterprise
Version: 1511
OS Build: 10586.494

Docker Version: 1-12-0-stable (build 5968)

I have also installed “Visual Studio 2015 Community edition”

Unable to remove from the database. Exit code: 1
at Docker.Core.Pipe.NamedPipeClient.TrySend(String action, Object[] parameters)
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
at Docker.Core.Backend.BackendClient.Start(Settings settings)
at Docker.Actions.DoStart(Settings settings, Boolean showWelcomeWindow)
at Docker.Core.TaskQueue.<.ctor>b__16_0()

I am also getting the same issue. I am running this on an Azure Virtual machine which has Windows 10 Enterprise edition, 64 bit OS.

Could someone please help?

I got the same issue.

Oracle VirtualBox
Windows 10 Pro 64-bit Guest
Windows 10 Home 64-bit Host

Unable to remove from the database. Exit code: 1
在 Docker.Core.Pipe.NamedPipeClient.TrySend(String action, Object[] parameters)
在 Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
在 Docker.Core.Backend.BackendClient.Start(Settings settings)
在 Docker.Actions.DoStart(Settings settings, Boolean showWelcomeWindow)
在 Docker.Actions.b__18_0()
在 Docker.Core.TaskQueue.<.ctor>b__16_0()

@zeroun @sunilrathod Docker for Windows is not expected to work in a VM guest or Azure VM, unless the host VM system supports nested virtualization.

Thank you for the update @friism

@friism is there a workaround or running Docker for Windows in VMWare?

It really depends on VMWare and whether Hyper-V is fully functional in your VMWare guest: http://www.vladan.fr/windows-server-2016-hyper-v-on-vmware/

I got the same problem.

I use the docker for windows few days ago.
I fell it’s cool , fell I am liking it.
but one day I shutdown my PC without safe mothed. the docker for windows did’t work in next time.

It say that :
Unable to remove from the database. Exit code: 1
在 Docker.Core.Pipe.NamedPipeClient.TrySend(String action, Object[] parameters)
在 Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
在 Docker.Core.Backend.BackendClient.Start(Settings settings)
在 Docker.Actions.DoStart(Settings settings, Boolean showWelcomeWindow)
在 Docker.Core.TaskQueue.<.ctor>b__16_0()

I use the windows :
cn_windows_10_enterprise_version_1511_x64_dvd_7224788
and the docker version :
Client:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 21:15:28 2016
OS/Arch: windows/amd64

Error response from daemon: The requested address is not valid in its context.

I’m trying use the 'windows install clear up ’ but it’s not helpful.
I do’t know what should i do.

… 今天我重装了我的网卡,重启完机器,docker 居然重新工作了.

oh~ today my docker is working when I uninstall my network card driver, and install a new one.
I think this only because I reinstall my network driver.

Same issue here on Windows 10 Pro, under VMware Fusion.
VMware tools installed.
VM machine configured with 2 vCPU and 4GB RAM

I could not see on the Hyper-V mgr the setting about the CPU that one of the link above mentioned. That article was referring to Win Server 2016 not Win 10.

The error I keep getting is:
Unable to write to the database. Exit code: 1
at Docker.Backend.Database.WriteKeys(ICollection1 keyValues) at Docker.Backend.Database.ModifyDatabase(ICollection1 keyValuesToWrite, ICollection`1 keysToRemove)
at Docker.Backend.Database.Write(Settings settings)
at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings)
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass8_0.b__0(Object[] parameters)
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)

we need a resolution if we want developers to use it :slight_smile:
thank you

@lmrz I’m not sure this is expected to work nested in VMWare, so it may be that the Hyper-V VM is not coming up correctly.

I am seeing this (“Unable to write to the database. Exit code: 1”) as well. I can see MobyLinuxVM in hyper V manager and I can start it just fine through the hyper v manager. I just can’t successfully start the Docker service without it crashing regarding the database. I have never had it work properly as I have just recently installed Docker. I rebooted and everything.

Windows 10 Enterprise Anniv Edition.

Thanks
Darren

I have been able to get it working. I switched over to Beta channel and it all started up just fine. I guess I will be staying on Beta … :slight_smile:

Thanks
Darren