Windows Server 1809 SMB bound directory works and then fails
Below are the results of running a simple server core container on Windows Server 1809, with an SMB directory mapped to the container. It works for awhile, then starts to fail, works again, then fails again. How can this be resolved?
When the failure starts happening, I can exec into the container and ping the server that hosts the SMB share successfully. I can also do a net use command to map the same folder and that works fine, while the mapped directory in the container still fails with permission denied.
PS S:\swarm> get-host
Name : ConsoleHost
Version : 5.1.17763.316
InstanceId : b8c1504c-d1ec-4866-9ab5-e799ac838a2a
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
PS S:\swarm> docker version
Client: Docker Engine - Enterprise
Version: 18.09.4
API version: 1.39
Go version: go1.10.8
Git commit: c3516c43ef
Built: 03/27/2019 18:22:15
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Enterprise
Engine:
Version: 18.09.4
API version: 1.39 (minimum version 1.24)
Go version: go1.10.8
Git commit: c3516c43ef
Built: 03/27/2019 18:20:29
OS/Arch: windows/amd64
Experimental: false
PS S:\swarm\customer> Get-SmbGlobalMapping
Status Local Path Remote Path
------ ---------- -----------
OK \\DEV-RDP-GATEWAY\sbm\customer\turtle
OK \\DEV-RDP-GATEWAY\sbm\dave\smb
OK U: \\DEV-RDP-GATEWAY.serenaondemand.com\sbm
PS S:\swarm> ls U:\customer\hawksbill\
Directory: U:\customer\hawksbill
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 4/4/2019 6:29 PM indexdir
d----- 4/2/2019 12:10 AM mongodb
PS S:\swarm> docker run -d -v u:\customer\hawksbill:C:\sbm mcr.microsoft.com/windows/servercore powershell "while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }" 2866d2a999e169e45b839876065567cf24b9b18034d2e427858f37075b007663
PS S:\swarm> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2866d2a999e1 mcr.microsoft.com/windows/servercore "powershell 'while (…" 6 seconds ago Up 4 seconds goofy_ramanujan
PS S:\swarm> docker logs -f 286
Thursday, April 4, 2019 9:49:28 PM
Thursday, April 4, 2019 9:50:28 PM
Thursday, April 4, 2019 9:51:28 PM
Thursday, April 4, 2019 9:52:28 PM
Thursday, April 4, 2019 9:53:28 PM
Thursday, April 4, 2019 9:54:28 PM
Thursday, April 4, 2019 9:55:28 PM
Thursday, April 4, 2019 9:56:28 PM
Thursday, April 4, 2019 9:57:28 PM
Thursday, April 4, 2019 9:58:28 PM
Thursday, April 4, 2019 9:59:28 PM
Thursday, April 4, 2019 10:00:28 PM
Thursday, April 4, 2019 10:01:28 PM
Thursday, April 4, 2019 10:02:28 PM
Thursday, April 4, 2019 10:03:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:04:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:05:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:06:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:07:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:08:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:09:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:10:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:11:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:12:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:13:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:14:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:15:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:16:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:17:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:18:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:19:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:20:29 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
Thursday, April 4, 2019 10:21:29 PM
Thursday, April 4, 2019 10:22:29 PM
Thursday, April 4, 2019 10:23:29 PM
Thursday, April 4, 2019 10:24:29 PM
Thursday, April 4, 2019 10:25:30 PM
Thursday, April 4, 2019 10:26:30 PM
Thursday, April 4, 2019 10:27:30 PM
Thursday, April 4, 2019 10:28:30 PM
Thursday, April 4, 2019 10:29:30 PM
Thursday, April 4, 2019 10:30:30 PM
Thursday, April 4, 2019 10:31:30 PM
Thursday, April 4, 2019 10:32:30 PM
Thursday, April 4, 2019 10:33:30 PM
Thursday, April 4, 2019 10:34:30 PM
Thursday, April 4, 2019 10:35:30 PM
Thursday, April 4, 2019 10:36:30 PM
cd : Access is denied
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\sbm:String) [Set-Location]
, UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe
rShell.Commands.SetLocationCommand
cd : Cannot find path 'C:\sbm' because it does not exist.
At line:1 char:23
+ while (1) { get-date; cd c:\sbm; start-sleep -seconds 60 }
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\sbm:String) [Set-Location],
ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLo
cationCommand
I have one windows 1809 node where I don't see this problem, and on my other two 1809 swarm nodes, I do see the problem. I have tried mapping with IP address to eliminate a possible DNS problem causing the issue, but it still fails even with IP. Again, failure is intermittent, sometimes it works for awhile, fails, then starts to work again. What else could I try to workaround the issue?
I am seeing the SMB problem most often right at 15 minutes after starting the container. This makes me think it's a 15 minute timeout. I tried setting this on the file server where the SMB share resides: net config server /autodisconnect:-1
Still getting the same problem. Anything else that could explain the 15 minute failure? Is there something I could try in the container itself?
I also tried using an SMB share on a Windows 1809 machine, but still saw the same failure.
Workaround from Microsoft: create a global smb mapping with no localpath (no drive letter). Microsoft has reproduced the problem and is working on a fix.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
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