Set-AzureStorageFileContent не может загрузить файл из основного контейнера Windows-сервера
У меня есть сценарий powershell, который не работает при запуске на главном контейнере сервера Windows. Мы считаем, что размер загружаемого файла способствует возникновению ошибки. Команда:
Set-AzureStorageFileContent -ShareName $ShareName -Source $Source -Path $Path -Force -Context $ctx -WhatIf:$false
Базовое изображение контейнера:
FROM microsoft/windowsservercore:1803
Ошибка:
2018-11-26T11:22:23.7734465Z ##[debug]Exception:
2018-11-26T11:22:23.7790483Z ##
[debug]Microsoft.WindowsAzure.Storage.StorageException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
2018-11-26T11:22:23.7800575Z ##[debug] at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult)
2018-11-26T11:22:23.7810276Z ##[debug] at System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult)
2018-11-26T11:22:23.7819765Z ##[debug] --- End of inner exception stack trace ---
2018-11-26T11:22:23.7828945Z ##[debug] at System.Net.ConnectStream.EndWrite(IAsyncResult asyncResult)
2018-11-26T11:22:23.7839200Z ##[debug] at System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_1(Stream stream, IAsyncResult asyncResult)
2018-11-26T11:22:23.7850124Z ##[debug] at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
2018-11-26T11:22:23.7859409Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2018-11-26T11:22:23.7869271Z ##[debug] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2018-11-26T11:22:23.7880375Z ##[debug] at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.<StartCopyStreamAsyncHelper>d__8.MoveNext()
2018-11-26T11:22:23.7890517Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2018-11-26T11:22:23.7901153Z ##[debug] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2018-11-26T11:22:23.7911931Z ##[debug] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2018-11-26T11:22:23.7923259Z ##[debug] at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.<StartCopyStreamAsync>d__4.MoveNext()
2018-11-26T11:22:23.7931632Z ##[debug] --- End of inner exception stack trace ---
2018-11-26T11:22:23.7941107Z ##[debug] at Microsoft.WindowsAzure.Commands.Storage.Common.DataMovementTransferHelper.<DoTransfer>d__0.MoveNext()
2018-11-26T11:22:23.7950056Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2018-11-26T11:22:23.7960169Z ##[debug] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2018-11-26T11:22:23.7969672Z ##[debug] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2018-11-26T11:22:23.7979590Z ##[debug] at Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet.SetAzureStorageFileContent.<>c__DisplayClass24_0.<<ExecuteCmdlet>b__0>d.MoveNext()
2018-11-26T11:22:23.7989849Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2018-11-26T11:22:23.8000359Z ##[debug] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2018-11-26T11:22:23.8010436Z ##[debug] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2018-11-26T11:22:23.8019959Z ##[debug] at Microsoft.WindowsAzure.Commands.Storage.Common.LimitedConcurrencyTaskScheduler.<RunConcurrentTask>d__26.MoveNext()
Есть ли способ увеличить ограничение размера файла? Мы попытались добавить ключи -ServerTimeoutPerRequest и -ClientTimeoutPerRequest к Set-AzureStorageFileContent без изменений или каких-либо последствий.