IBM Support

Failed to start container - failed to create endpoint share-proxy on network nat - the file local-kv.db.lock is being used by another process



Errors when Planning Analytics Workspace is restarted automatically after rebooting the Windows server machine:

Failed to start container eaa8604bfe35f171577395d85b463f0abaa96c1b080cf03c786a261460511556:
failed to create endpoint share-proxy on network nat:
failed to save endpoint 3a7b3bb to store:
failed to update store for object type *windows.hnsEndpoint:
open F:\DockerData/network/files/local-kv.db.lock:
The process cannot access the file because it is being used by another process.
","1",,"0","2","0",,"36028797018963968","38929","docker",,"Application",,,"",,"11/07/2021 19:22:52",,,



This can be a timing issue, due to the numerous operations a Windows server has to perform while initializing.
This can also be a docker defect.

Resolving The Problem

To quickly resolve the problem, open Powershell and run this:
cd <PAW_root_path>
(without any additional parameters)
This will regenerate and restart all containers.

Also verify that "docker" service startup mode is set to "Automatic (Delayed start)" and not just "Automatic".

If the docker version is too old (for example if version is 17.06.x) then update the version of Docker by copying and pasting this block of commands into Powershell after having changed the current directory to the PAW install directory (where Start.ps1 resides).

First it is recommended to run Powershell with elevated admin rights by right-clicking and selecting "Run as administrator".

The below script will first delete existing PAW containers (so that to let them be regenerated properly by the new docker version), back up the docker-compose.exe to prevent its deletion, then upgrade docker and clean up the docker network by the way, finally it will regenerate and restart all containers. Before taking any action, please run the <PAW>/scripts/backup.ps1 script to save all existing databases (they will be stored in <PAW>/backup by default)

IF ((Get-Service -Name docker).status -ne 'Running') { Start-Service docker }
IF (Test-Path ./Start.ps1){
Powershell './scripts/paw.ps1 stop'
docker stop admintool
docker rm $(docker ps -a -q)
Copy-Item -Path 'C:\Program Files\docker\docker-compose.exe' -Destination "$env:TEMP"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet
Install-Module DockerMsftProvider -Force
Install-Package -Name docker -ProviderName DockerMsftProvider -verbose -RequiredVersion 20.10 -Update -Force
Move-Item -Path "$env:TEMP/docker-compose.exe" -Destination 'C:\Program Files\docker\'
docker network rm $(docker network ls -q)
Stop-Service docker
Get-ContainerNetwork | Remove-ContainerNetwork -force
Get-VMSwitch | Remove-VMSwitch -force   
Get-NetNatStaticMapping | Remove-NetNatStaticMapping -Confirm:$false
Get-NetNat | Remove-NetNat -Confirm:$false
Restart-Service HNS
Start-Service docker
Restart-Service docker
Powershell '.\scripts\paw.ps1'
Powershell '.\scripts\paw.ps1 ps'

Document Location


[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSCTEW","label":"IBM Planning Analytics Local"},"ARM Category":[{"code":"a8m50000000KzKqAAK","label":"Planning Analytics Workspace->Docker"},{"code":"a8m0z000000blfjAAA","label":"Troubleshooting"}],"ARM Case Number":"","Platform":[{"code":"PF033","label":"Windows"}],"Version":"All Versions"}]

Document Information

Modified date:
29 July 2021