New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker load not working #355

Open
thunderbird85 opened this Issue Aug 11, 2016 · 136 comments

Comments

Projects
None yet
@thunderbird85

thunderbird85 commented Aug 11, 2016

Hi,
I have try the description from
Virtualization-Documentation/virtualization/windowscontainers/quick_start/quick_start_windows_10.md
but there is a problem on Step 3
docker load -i nanoserver.tar.gz

I got the following error

PS C:\WINDOWS\temp> docker load -i .\nanoserver.tar.gz
58684737b3d1: Loading layer [==================================================>] 1.007 GB
re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\docker\windowsfilter\5d73fa815a57e4506ad2457c
fd875f7b6bd2c0dee7e0050beadc754566bb63d0\UtilityVM: The process cannot access the file because it is being used by another process.

If I try it with docker pull it's the same:

PS C:\WINDOWS\temp> docker pull microsoft/nanoserver
Using default tag: latest
latest: Pulling from microsoft/nanoserver

cf62dbf6d334: Extracting [==================================================>] 358.4 MB/358.4 MB
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\docker\windowsfilte
r\a5dfe6399ddf943c54bc1330562c7095c29b3bdadb74673f56a1257ac6b916bd\UtilityVM: The process cannot access the file because
 it is being used by another process.

The PowerShell ist startet as administrator.

Docker version:

PS C:\WINDOWS\system32> docker version
Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 23:54:00 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 23:54:00 2016
 OS/Arch:      windows/amd64

Windows Insider-Build 14393.67

@PatrickLang

This comment has been minimized.

Contributor

PatrickLang commented Aug 11, 2016

Do you have any other images installed? I haven't seen this problem since we released put microsoft/nanoserver on Docker Hub last week

docker pull microsoft/nanoserver is the right way to do this with Docker v1.12 on your build

@enderb-ms can you watch this issue?

@thunderbird85

This comment has been minimized.

thunderbird85 commented Aug 11, 2016

There is no other image installed. I have try it with windowsservercore but it's the same

PS C:\WINDOWS\system32> docker pull microsoft/windowsservercore
Using default tag: latest
latest: Pulling from microsoft/windowsservercore
1239394e5a8a: Extracting [==================================================>] 3.461 GB/3.461 GB
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\docker\windowsfilte
r\aa05cc75c4fa4660b44e4407f55c0038fddad2a5d57d0cb7dc552f6076f63950\UtilityVM: The process cannot access the file because
 it is being used by another process.
@zuckerthoben

This comment has been minimized.

zuckerthoben commented Aug 30, 2016

I have the same problem

PS C:\Windows\system32> docker pull microsoft/nanoserver
Using default tag: latest
latest: Pulling from microsoft/nanoserver

cf62dbf6d334: Extracting [==================================================>] 358.4 MB/358.4 MB
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\docker\windowsfilte
r\85b915e504d982a9df9ee6865995480369c5d1cdef651c3547c278607d56b59b\UtilityVM: The process cannot access the file because
 it is being used by another process.
PS C:\Windows\system32>
@wangosu

This comment has been minimized.

wangosu commented Sep 8, 2016

Any update or work around on this? I got the same error.

@StefanScherer

This comment has been minimized.

Contributor

StefanScherer commented Sep 8, 2016

@wangosu Have a look st the Windows 10 installation docs. It has been updated to download docker 1.13.0-dev zip file which fixes this issue.

@wangosu

This comment has been minimized.

wangosu commented Sep 8, 2016

@StefanScherer I did exactly as stated in https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/quick_start_windows_10
with the 1.13.0-dev.zip
but still have the same error

@thunderbird85

This comment has been minimized.

thunderbird85 commented Sep 9, 2016

I have try it with 1.13.0 too
and for me it's the same error

@StefanScherer

This comment has been minimized.

Contributor

StefanScherer commented Sep 9, 2016

Still struggling at docker load?
Or using the docker pull microsoft/nanoserver command?

I've just spun up an empty Win10 1607 VM and installed Docker and pulled the nanoserver image and it worked fine.

Details of my setup can be found in this Vagrant environment and especially in this install-docker.ps1 script.

What does docker info and docker images show on your machine?

@wangosu

This comment has been minimized.

wangosu commented Sep 9, 2016

My issue is docker pull, I tried both microsoft/nanoserver, microsoft/iis; after the image is extracted, both gave error:" failed to register layer; re-exec eror: exiy status 1: output: ProcessUtilityVMImage C:\ProgramData\docker\windowsfilter...\UtilityVM: The process cannot access the file because
it is being used by another process."
docker ps shows no container

@VladM-L

This comment has been minimized.

VladM-L commented Sep 12, 2016

I am getting exactly the same error using both 1.12.0 and 1.13.0-dev.
Interestingly, the folder and file it is complaining about are not there, i.e. the folder C:\ProgramData\Docker\windowsfilter is empty on my machine.
I tried disabling antivirus, but it didn't change anything.

I had Docker for Windows installed previously and it was working fine for Linus based images. But I need to run windows based apps, so I uninstalled that, installed Windows Containers and get this error for all windows images that I tried.

Please help. Thank you!

@wangosu

This comment has been minimized.

wangosu commented Sep 12, 2016

Here is what i found after trying different ways:

  1. On VM, works when pull images; but failed to run because VM does not have Hyper-V. So it works as expected.
  2. On my laptop, upgraded to build 1607, still have the same issue when pull images no matter how many times I re-installed docker.
  3. On my surface Pro, upgraded to build 1607 also. Surprisingly everything works.
    I don't know why works on Surface but not on laptop. Both has the same OS build of 14393.105.
@VladM-L

This comment has been minimized.

VladM-L commented Sep 12, 2016

I found another thread about the same issue and someone there mentioned that it started to work after he completely removed antivirus software: https://social.msdn.microsoft.com/Forums/en-US/13523ccf-baf4-49fc-9e73-1df07e512304/reexec-error-when-trying-to-load-nanoserver-image?forum=windowscontainers
I.e. disabling Antivirus or using exceptions doesn't help, but removing it does.
I am going to try it if I get green light from our IT.

@wangosu

This comment has been minimized.

wangosu commented Sep 13, 2016

VladM-L, removed the antivirus did help. It is working for me now. Thanks

@VladM-L

This comment has been minimized.

VladM-L commented Sep 13, 2016

You are welcome wangosu!
It worked for me too after I uninstalled Symantec Endpoint Protection.

@msnelling

This comment has been minimized.

msnelling commented Sep 14, 2016

Unfortunately for me I'm also having the same issue, but uninstalling antivirus an option. Wouldn't it be better to get to the bottom of the issue rather than asking people to compromise their security?

@antfurn

This comment has been minimized.

antfurn commented Sep 21, 2016

Yep - I'm hitting this error too :-(

Fresh Win10 install but must run Symantec Endpoint Proctection (corporate policy).
So I'm stuffed until this is fixed!

PS C:\Program Files\Docker\Docker> docker version
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 17:32:24 2016
OS/Arch: windows/amd64
Experimental: true

Server:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.7.1
Git commit: c2decbe
Built: Tue Sep 13 15:12:54 2016
OS/Arch: windows/amd64
PS C:\Program Files\Docker\Docker>

@aphophas

This comment has been minimized.

aphophas commented Oct 1, 2016

I was able to get around this by just adding a folder exclusion for "C:\ProgramData\docker" in SEP on my box. Once I did that, the temp file being locked was released, and I was able to successfully pull, extract and view the image on my box. I hope this helps out, as I agree that fully uninstalled SEP or any AV product is not a valid workaround.

@msnelling

This comment has been minimized.

msnelling commented Oct 1, 2016

@aphophas I tried the same thing and it didn't help in my case, only a full uninstall did the trick unfortunately.

@dguidara

This comment has been minimized.

dguidara commented Oct 8, 2016

I can confirm that Unintalling Norton fixes it. Its only the extracting that fails. If you extract and reinstall you can run the images.

@tutnes

This comment has been minimized.

tutnes commented Oct 13, 2016

I can confirm that temporarily disabling BitDefender mitigated the issue.

@rchhatwal

This comment has been minimized.

rchhatwal commented Nov 1, 2016

Added folder exclusions for "C:\ProgramData\docker" & "C:\ProgramData\docker". Still getting the same error:
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\docker\windowsfilte
r\f78c774278a7fd05393db8b6e9d3b66b74cf635cab5fcf1c1a570628ccf12a92\UtilityVM: The process cannot access the file because it is being used by another process.
_

@RyanNewsom

This comment has been minimized.

RyanNewsom commented Nov 9, 2016

+1 for me. Tried disabling Norton, but of course is still had running processes. Had to fully uninstall it, then redid the pull and it worked.
Docker: 1.12.3

@dschilling

This comment has been minimized.

dschilling commented Nov 30, 2016

I was having this same issue. I have Symantec Endpoint Protection - and it's password protected so I can't uninstall or change its exclusions. However, the problem went away after I upgraded to Docker 1.14! https://master.dockerproject.org/windows/amd64/docker-1.14.0-dev.zip

PS C:\WINDOWS\system32> docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 17:52:38 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.14.0-dev
 API version:  1.26
 Go version:   go1.7.3
 Git commit:   e349d3d
 Built:        Mon Nov 21 19:30:47 2016
 OS/Arch:      windows/amd64
@jplonghi

This comment has been minimized.

jplonghi commented Nov 30, 2016

@dschilling do you have instructions or link on how to perform the upgrade?

PS C:\WINDOWS\system32> docker version
Client:
 Version:      1.13.0-rc2
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   1f9b3ef
 Built:        Wed Nov 23 17:40:58 2016
 OS/Arch:      windows/amd64

Server:
 Version:             1.13.0-rc2
 API version:         1.25
 Minimum API version: 1.24
 Go version:          go1.7.3
 Git commit:          1f9b3ef
 Built:               Wed Nov 23 17:40:58 2016
 OS/Arch:             windows/amd64
 Experimental:        false
@jabbera

This comment has been minimized.

jabbera commented Dec 7, 2016

@jplonghi if you figure that out let me know please.

@StefanScherer

This comment has been minimized.

Contributor

StefanScherer commented Dec 7, 2016

@philofinfinitejest

This comment has been minimized.

philofinfinitejest commented Dec 8, 2016

I am getting the same behavior with version 1.14

Version

Client:
Version: 1.14.0-dev
API version: 1.26
Go version: go1.7.3
Git commit: e308f6b
Built: Tue Nov 22 18:15:55 2016
OS/Arch: windows/amd64

Server:
Version: 1.14.0-dev
API version: 1.26
Minimum API version: 1.24
Go version: go1.7.3
Git commit: e308f6b
Built: Tue Nov 22 18:15:55 2016
OS/Arch: windows/amd64
Experimental: false

Error

[16:48:51.689][WindowsDockerDaemon][Info ] time="2016-12-07T16:48:51.688867300-08:00" level=error msg="Error trying v2 registry: failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\Docker\windowsfilter\4a3cff26991a967f76d0ae1eb8daf8115632bc769df418fb1eb21f756e07f131\UtilityVM: The process cannot access the file because it is being used by another process."
[16:48:51.689][WindowsDockerDaemon][Info ] time="2016-12-07T16:48:51.688867300-08:00" level=error msg="Attempting next endpoint for pull after error: failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\Docker\windowsfilter\4a3cff26991a967f76d0ae1eb8daf8115632bc769df418fb1eb21f756e07f131\UtilityVM: The process cannot access the file because it is being used by another process."

@jabbera

This comment has been minimized.

jabbera commented Dec 8, 2016

I had to uninstall SEP

@drnybble

This comment has been minimized.

drnybble commented Jul 17, 2017

Seems that the latest version of Symantec is still not working: https://www.symantec.com/connect/forums/sep-14-stops-docker-windows-working-0

"Proactive Threat Protection" seems to be the culprit. On my installation of 14 MP1 I do not have that component which is why I guess it is working.

@mylesbkeating1993 For some reason I see a message saying I unassigned this issue from you. No idea why that happened.

@eduard-t

This comment has been minimized.

eduard-t commented Aug 4, 2017

I'm getting this error when I'm using windows containers but not when using linux containers.

failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\Docker\windowsfilter\bfb413e53c1fbb3b69238d94146efefe04bae47de114c16ae12e8a282e36fffe\UtilityVM: The process cannot access the file because it is being used by another process.

I'm using Kaspersky Endpoint Security 10. Tried disabling it, excluding multiple paths but still no luck.

these are the logs of it not working:

[11:00:32.939][WindowsDockerDaemon][Debug ] time="2017-08-04T11:00:32.938546300+01:00" msg="Calling POST /v1.30/images/create?fromImage=microsoft%2Fnanoserver&tag=latest"
[11:00:32.939][WindowsDockerDaemon][Debug ] time="2017-08-04T11:00:32.939043700+01:00" msg="Trying to pull microsoft/nanoserver from https://registry-1.docker.io v2"
[11:00:34.604][WindowsDockerDaemon][Debug ] time="2017-08-04T11:00:34.604238400+01:00" msg="Pulling ref from V2 registry: microsoft/nanoserver:latest"
[11:00:35.052][WindowsDockerDaemon][Debug ] time="2017-08-04T11:00:35.052772500+01:00" msg="pulling blob "sha256:baa0507b781fcbf25230671393ddd64a7028872f57c375e758e9d11335cdc4ab""
[11:00:35.052][WindowsDockerDaemon][Debug ] time="2017-08-04T11:00:35.052772500+01:00" msg="pulling blob "sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277""
[11:00:35.421][WindowsDockerDaemon][Debug ] time="2017-08-04T11:00:35.421133200+01:00" msg="Pulling sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277 from foreign URL https://go.microsoft.com/fwlink/?linkid=837858"
[11:00:35.436][WindowsDockerDaemon][Debug ] time="2017-08-04T11:00:35.436496500+01:00" msg="Pulling sha256:baa0507b781fcbf25230671393ddd64a7028872f57c375e758e9d11335cdc4ab from foreign URL https://go.microsoft.com/fwlink/?linkid=852687"
[11:01:21.426][WindowsDockerDaemon][Debug ] time="2017-08-04T11:01:21.426329300+01:00" msg="Downloaded baa0507b781f to tempfile C:\Windows\TEMP\GetImageBlob803990732"
[11:01:40.860][WindowsDockerDaemon][Debug ] time="2017-08-04T11:01:40.860953900+01:00" msg="Downloaded bce2fbc256ea to tempfile C:\Windows\TEMP\GetImageBlob956793787"
[11:01:40.861][WindowsDockerDaemon][Debug ] time="2017-08-04T11:01:40.861456800+01:00" msg="hcsshim::CreateLayer Flavour 1 ID a4031cf1ff818ee7799a4b632ea5fe27f9d730f3c1588d54bd674dfe1ac954e0 parent "
[11:01:40.861][WindowsDockerDaemon][Debug ] time="2017-08-04T11:01:40.861955800+01:00" msg="hcsshim::CreateLayer - succeeded id=a4031cf1ff818ee7799a4b632ea5fe27f9d730f3c1588d54bd674dfe1ac954e0 parent= flavour=1"
[11:02:11.688][WindowsDockerDaemon][Debug ] time="2017-08-04T11:02:11.688929200+01:00" msg="Cleaning up layer a4031cf1ff818ee7799a4b632ea5fe27f9d730f3c1588d54bd674dfe1ac954e0: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\Docker\windowsfilter\a4031cf1ff818ee7799a4b632ea5fe27f9d730f3c1588d54bd674dfe1ac954e0\UtilityVM: The process cannot access the file because it is being used by another process."
[11:02:11.692][WindowsDockerDaemon][Debug ] time="2017-08-04T11:02:11.688929200+01:00" msg="HCSShim::GetContainers query={}"
[11:02:11.693][WindowsDockerDaemon][Debug ] time="2017-08-04T11:02:11.690428100+01:00" msg="HCSShim::GetContainers succeeded"
[11:02:11.707][WindowsDockerDaemon][Debug ] time="2017-08-04T11:02:11.707429100+01:00" msg="hcsshim::DestroyLayer Flavour 1 ID a4031cf1ff818ee7799a4b632ea5fe27f9d730f3c1588d54bd674dfe1ac954e0-removing"
[11:02:17.952][WindowsDockerDaemon][Debug ] time="2017-08-04T11:02:17.952360000+01:00" msg="hcsshim::DestroyLayer succeeded flavour=1 id=a4031cf1ff818ee7799a4b632ea5fe27f9d730f3c1588d54bd674dfe1ac954e0-removing"
[11:02:17.969][WindowsDockerDaemon][Info ] time="2017-08-04T11:02:17.968858100+01:00" msg="Attempting next endpoint for pull after error: failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\Docker\windowsfilter\a4031cf1ff818ee7799a4b632ea5fe27f9d730f3c1588d54bd674dfe1ac954e0\UtilityVM: The process cannot access the file because it is being used by another process."

@eduard-t

This comment has been minimized.

eduard-t commented Aug 4, 2017

just an update...

I've uninstalled Kaspersky Endpoint Security 10 and docker pull microsoft/nanoserver works again

these are the logs of it working:

[13:35:00.925][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:00.925462700+01:00" msg="Calling POST /v1.30/images/create?fromImage=microsoft%2Fnanoserver&tag=latest"
[13:35:00.930][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:00.930463500+01:00" msg="Trying to pull microsoft/nanoserver from https://registry-1.docker.io v2"
[13:35:03.030][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:03.030025500+01:00" msg="Pulling ref from V2 registry: microsoft/nanoserver:latest"
[13:35:03.465][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:03.465747500+01:00" msg="pulling blob "sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277""
[13:35:03.466][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:03.465747500+01:00" msg="pulling blob "sha256:baa0507b781fcbf25230671393ddd64a7028872f57c375e758e9d11335cdc4ab""
[13:35:03.807][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:03.807026300+01:00" msg="Pulling sha256:baa0507b781fcbf25230671393ddd64a7028872f57c375e758e9d11335cdc4ab from foreign URL https://go.microsoft.com/fwlink/?linkid=852687"
[13:35:03.809][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:03.809029700+01:00" msg="Pulling sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277 from foreign URL https://go.microsoft.com/fwlink/?linkid=837858"
[13:35:52.979][WindowsDockerDaemon][Debug ] time="2017-08-04T13:35:52.979864900+01:00" msg="Downloaded baa0507b781f to tempfile C:\Windows\TEMP\GetImageBlob801477738"
[13:36:17.055][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:17.055686800+01:00" msg="Downloaded bce2fbc256ea to tempfile C:\Windows\TEMP\GetImageBlob464732535"
[13:36:17.059][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:17.059689200+01:00" msg="hcsshim::CreateLayer Flavour 1 ID e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252 parent "
[13:36:17.061][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:17.061690800+01:00" msg="hcsshim::CreateLayer - succeeded id=e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252 parent= flavour=1"
[13:36:52.050][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.050462300+01:00" msg="Applied tar sha256:6c357baed9f5177e8c8fd1fa35b39266f329535ec8801385134790eb08d8787d to e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252, size: 700801786"
[13:36:52.093][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.092656700+01:00" msg="hcsshim::GetLayerMountPath Flavour 1 ID e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252"
[13:36:52.093][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.092656700+01:00" msg="Calling proc (1)"
[13:36:52.093][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.093644100+01:00" msg="Calling proc (2)"
[13:36:52.093][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.093644100+01:00" msg="hcsshim::GetLayerMountPath succeeded flavour=1 id=e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252 path=C:\ProgramData\Docker\windowsfilter\e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252"
[13:36:52.093][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.093644100+01:00" msg="hcsshim::CreateLayer Flavour 1 ID 7acc8a9734e86efe139ce9eb38bee0da4c434b70f6732147dbc52c49bed73ba9 parent e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252"
[13:36:52.093][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.093644100+01:00" msg="hcsshim::CreateLayer - succeeded id=7acc8a9734e86efe139ce9eb38bee0da4c434b70f6732147dbc52c49bed73ba9 parent=e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252 flavour=1"
[13:36:52.095][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.095643300+01:00" msg="hcsshim::GetLayerMountPath Flavour 1 ID e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252"
[13:36:52.095][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.095643300+01:00" msg="Calling proc (1)"
[13:36:52.095][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.095643300+01:00" msg="Calling proc (2)"
[13:36:52.095][WindowsDockerDaemon][Debug ] time="2017-08-04T13:36:52.095643300+01:00" msg="hcsshim::GetLayerMountPath succeeded flavour=1 id=e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252 path=C:\ProgramData\Docker\windowsfilter\e561a6f5ce7f21284d16560eb74d012d664d15cf0118c52f1e35fe110e4ef252"
[13:37:12.599][WindowsDockerDaemon][Debug ] time="2017-08-04T13:37:12.599694700+01:00" msg="Applied tar sha256:67f92755d5a5192b9831aec1c6d1dbcf3697abbeb6478e8b1ca1037fbd7e67e6 to 7acc8a9734e86efe139ce9eb38bee0da4c434b70f6732147dbc52c49bed73ba9, size: 346522800"

@DavidHaitch

This comment has been minimized.

DavidHaitch commented Oct 3, 2017

I believe I've discovered a cause besides anti-virus problems. In my case, it was one particular file that was always locked:
PS Q:\> docker pull microsoft/windowsservercore Using default tag: latest latest: Pulling from microsoft/windowsservercore 3889bb8d808b: Already exists da87b55a9b63: Extracting [==================================================>] 1.266GB/1.266GB failed to register layer: re-exec error: exit status 1: output: remove \\?\D:\DockerData\windowsfilter\9c420937b1d524adbaefdbf7d1b9f6af927baff9680ea3587861656b70952645\UtilityVM\Files\Windows\servicing\Packages\ Microsoft-NanoServer-Win32Compat-Package~31bf3856ad364e35~amd64~en-US~10.0.14393.0.cat: The process cannot access the file because it is being used by another process.

It was always that one NanoServer-Win32Compat package. Disabling antivirus had no effect. What did fix this was going to C:\Windows\Temp, and deleting every folder that began with "hcs".

It looks like these folders are created by the Host Compute Service during the image creation process. They're supposed to be cleaned up at the end of the build, but mine weren't. Apparently they were holding some kind of lock, and that lock was interfering with both the extraction process, and the Temp cleanup process.

I hope this info helps anyone else who has this issue!

@JanneRantala

This comment has been minimized.

JanneRantala commented Oct 4, 2017

Hi @DavidHaitch! I've noticed, that the same file as you mentioned is being used by another process in my environment as well. Sometimes I've managed to get over it by killing vmcompute -process but yesterday things got so stuck up that I had to zap my whole docker folder. Now everything seems to work alright again, but the next time I'll get that error I'll try your fix. Thanks!

@DavidHaitch

This comment has been minimized.

DavidHaitch commented Oct 4, 2017

@JanneRantala If you do see this again, try pulling microsoft/windowsservercore-insider first. That one worked for me when the regular windowsservercore did not.

@JanneRantala

This comment has been minimized.

JanneRantala commented Oct 4, 2017

@DavidHaitch I'm not using insider version of Windows 10.

@DavidHaitch

This comment has been minimized.

DavidHaitch commented Oct 4, 2017

@JanneRantala Neither am I. The windowsservercore-insider container worked nevertheless. Such is the magic of containerization.

@PhilStanton

This comment has been minimized.

PhilStanton commented Oct 8, 2017

Tried adding folders to exclusions in Kaspersky, still not helping. Having to uninstall anti-virus to get Docker for Windows to work, if that does fix it, is a bit much.

@brunofvalli

This comment has been minimized.

brunofvalli commented Nov 1, 2017

I have found if I stop and remove the running containers on my docker it seems to solve the issue. So I guess I need a build box that I will never run a container on it.

@nanoant

This comment has been minimized.

nanoant commented Nov 6, 2017

@aphophas I am curious about this SEP exclusion for C:\ProgramData\docker that worked for you, but not for me. Which version of SEP you are using (12 or 14)?

@wadinj

This comment has been minimized.

wadinj commented Nov 16, 2017

Nothing interesting works for me here. For sure, I didn't try to uninstall my SEP (corporate policy as everyone). But, disable SEP and BitLocker change nothing, always stuck to :
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\Docker\windowsfilter\cc9a78038e66f96bd8d0851d02a5a825d809497f1980b691d10748fe36efa d1e\UtilityVM: The process cannot access the file because it is being used by another process.

I guess one good solution will be to add a timeout option in docker to wait for availability of the internal file ?

For information I'm under the lastest stable version of Docker :

Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:09 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.24)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:50:27 2017
 OS/Arch:      windows/amd64
 Experimental: true
@nanoant

This comment has been minimized.

nanoant commented Nov 18, 2017

FYI (@wadinj et al.) this is not Docker fault, it is ProcessUtilityImage in vmcompute.dll aka Windows Host Compute API (part of Windows OS) used by Docker via https://github.com/Microsoft/hcsshim, that is faulting with ERROR_SHARING_VIOLATION exception that is simply brought back and reported by Docker.

There is nothing Docker can do about it. Since ProcessUtilityImage doing kind lot of things creating virtual HD image etc. and it fails at some stage.

I wrote myself simple Go app that is just calling ProcessUtilityImage on NanoServer Docker extracted files, and managed to replicate the erroneous behavior. However, I found no workaround, neither SEP v12 scanning exclusions helped. Something there (probably SEP or other AV) holds too long a file handle to vhdx file generated during ProcessUtilityImage and when there's a need to lock the file for further processing, sharing violation is emitted.

So if there is anything that can be fixed (or improved), it has to be done in vmcompute.dll owned by Microsoft, which I believe won't happen anytime soon, coz it requires system update or KB, which takes a while to release.

I am currently waiting for SEP v14 upgrade, once I upgrade I'll let you know if this fixes the problem on my side.

@wadinj

This comment has been minimized.

wadinj commented Nov 18, 2017

@nanoant Great analyze ! I didn't spend more time on and finally switch to Linux container with toolbox.
For sure, if you figure out a solution, I'm interested.

Thanks !

@judavi

This comment has been minimized.

Contributor

judavi commented Dec 7, 2017

I face the same issue on WS2016, and was basically because I was trying to "store" the images in the D drive. So after remove the setting "data-root": "D:\dockerimages" from the config now is working well

@wadinj

This comment has been minimized.

wadinj commented Dec 7, 2017

Finally this error went away when I downloaded the edge version of Docker to replace the stable one.

@fakoua

This comment has been minimized.

fakoua commented Dec 13, 2017

Have you tried to disable the compression on the folder: C:\ProgramData\Docker?

Just try that, Right click ont he folder docker -> properties -> advanced -> uncheck "Compress contents to save disk space"

Do it while docker is off.

Thanks

@mduft

This comment has been minimized.

mduft commented Mar 1, 2018

Happens for me too :(

C:\Users\mduft>docker pull microsoft/nanoserver
Using default tag: latest
latest: Pulling from microsoft/nanoserver
bce2fbc256ea: Extracting [==================================================>] 252.7MB/252.7MB
cb1aafb71473: Download complete
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\Docker\windowsfilter\5b94e74ae51b8d01095369e08fa28d24caa043efe42f2369fbcdc15610cbbe6d\UtilityVM: The process cannot access the file because it is being used by another process.

C:\Users\mduft>docker version
Client:
Version: 18.03.0-ce-rc1
API version: 1.37
Go version: go1.9.4
Git commit: c160c73
Built: Thu Feb 22 02:34:04 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: 18.03.0-ce-rc1
API version: 1.37 (minimum version 1.24)
Go version: go1.9.4
Git commit: c160c73
Built: Thu Feb 22 02:41:20 2018
OS/Arch: windows/amd64
Experimental: true

Having SEP 12 here, cannot disable, upgrade or change config (corporate policy).

@nanoant

This comment has been minimized.

nanoant commented Mar 23, 2018

Just to let you know, I am now at SEP 14 RU1 MP1 and everything is working as expected finally, so it is definitely SEP 12 issue. @mduft @aphophas @ecornell @wadinj I recommend upgrading to SEP 14 then.

@JoshSchreuder

This comment has been minimized.

JoshSchreuder commented Apr 10, 2018

I tried in a fresh Windows 10 Enterprise N 1709 VM and installed McAfee Endpoint Protection 10.5.3.3178.

Out of the box the docker pull command worked fine.

Running 10.5.1 elsewhere and it has this issue, not 100% if it's McAfee or some other environmental issue.

@artisticcheese

This comment has been minimized.

Contributor

artisticcheese commented Apr 10, 2018

Mcafee AV officially does not support docker containers, so you will get hit a miss situation in both development and production.

@n4meless0ne

This comment has been minimized.

n4meless0ne commented Apr 11, 2018

I have the same issue:

D:\>docker pull microsoft/nanoserver
Using default tag: latest
latest: Pulling from microsoft/nanoserver
bce2fbc256ea: Extracting [==================================================>]  252.7MB/252.7MB
83eec61707e8: Download complete
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage D:\docker\Images\windowsfilter\7ab8e812ac8b46a65abfd94848105ece59a37c4841863ae4d742fbefdd93a3c7\UtilityVM: The process cann
ot access the file because it is being used by another process.

D:\>docker version
Client:
 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:06:28 2018
 OS/Arch:       windows/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.03.0-ce
  API version:  1.37 (minimum version 1.24)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:        Wed Mar 21 23:21:06 2018
  OS/Arch:      windows/amd64
  Experimental: false

AV: Kaspersky Endpoint Security 10.3.0.6294
OS: Microsoft Windows [Version 10.0.15063]

Temporary AV disabling didn't help. Can't remove AV because of the corporate policy.

@gitfool

This comment has been minimized.

gitfool commented Apr 19, 2018

I have the same issue on Windows Server 1709 using current latest everything:

C:\>ver
Microsoft Windows [Version 10.0.16299.371]

C:\>docker version
Client:
 Version:      17.10.0-ee-preview-3
 API version:  1.33
 Go version:   go1.8.4
 Git commit:   1649af8
 Built:        Fri Oct  6 17:52:28 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.10.0-ee-preview-3
 API version:  1.34 (minimum version 1.24)
 Go version:   go1.8.4
 Git commit:   b8571fd
 Built:        Fri Oct  6 18:01:48 2017
 OS/Arch:      windows/amd64
 Experimental: true

C:\>docker pull microsoft/dotnet-framework-build:4.7.1-windowsservercore-1709
...
failed to register layer: re-exec error: exit status 1: output: remove \\?\C:\ProgramData\docker\windowsfilter\31f2dab02e9b94b1bbc14ceb542522e493057c128c02d571936955b71db68d04\UtilityVM\Files\Windows\WinSxS\amd64_microsoft-windows-workstationservice_31bf3856ad364e35_10.0.16299.15_none_ef2643e047f6349e\wkssvc.dll: Access is denied.

I only have the built-in Windows Defender feature installed, so I tried excluding the Docker folder:

Set-MpPreference -ExclusionPath "C:\ProgramData\docker"

Then I tried disabling Windows Defender realtime monitoring:

Set-MpPreference -DisableRealtimeMonitoring $true

Then I tried removing the Windows Defender feature:

Uninstall-WindowsFeature -Name "Windows-Defender"
Restart-Computer

Finally, I tried @brunofvalli 's suggestion and I stopped all other running containers before pulling the container and it worked. Eureka!

@janainaemilia

This comment has been minimized.

janainaemilia commented Jul 12, 2018

@RustyCZ You rock! I had the same problem when execute docker pull microsoft/mssql-server-windows-express, and when I stopped the others containers and execute pull again, it works! Thank you 💯

@filou77

This comment has been minimized.

filou77 commented Jul 26, 2018

I have got the same error.
Then I realized that I tried to use a version of windowsservercore that was unsupported by my host OS according to:
https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment