azure - 无法将 VHD 上传到 azure 失败

标签 azure azure-storage azure-blob-storage

我正在尝试将 VHD 文件上传到 azure。我正在使用命令行设置连接并开始上传。当它进行上传时,它会计算哈希值,然后开始上传文件,但随后失败并显示一条很长的消息。

C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10>csupload Add-Pers
istentVMImage -Destination "http://testrli.blob.core.windows.net/test3/EO Testin
g.vhd" -Label "EO Testing.vhd" -LiteralPath "C:\VIRTUALMACHINES\PAT5DB\EO Traini
ng.vhd" -OS Windows
Windows(R) Azure(TM) Upload Tool version 1.8.0.0
for Microsoft(R) .NET Framework 3.5
Copyright (c) Microsoft Corporation. All rights reserved.

Use of http is insecure, can leak data to untrusted viewers and make your   contentvulnerable to data tampering by a malicious third party.
Using the saved connection string...
Using image name 'EOTraining.vhd'
Found existing page blob. Resuming upload...
MD5 hash is being calculated for the file 'C:\VIRTUALMACHINES\PAT5DB\EO Training
.vhd'.
MD5 hash calculation is completed.ning Time: 00:00:01; Throughput: 1344.2Mbps
Elapsed time for the operation: 00:12:27
Upload failed with exceptions:
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encounte
red an unknown failure: The underlying connection was closed: An unexpected erro
r occurred on a receive. ---> System.Net.WebException: The underlying connection
was closed: An unexpected error occurred on a receive. ---> System.IO.IOExcepti
on: Unable to read data from the transport connection: An existing connection wa
s forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: A
n existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebReq
uest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.Sync.Upload.BlobSynchronizer.<>c__DisplayClass4.<Sy
nchronize>b__1(DataWithRange dwr, CloudPageBlob b)
at Microsoft.WindowsAzure.Sync.Threading.Parallel.<>c__DisplayClass7`2.<ForEa
ch>b__1(Object )
Elapsed time for upload: 00:02:17

最佳答案

这里有几件事需要注意。

  1. 您正在使用 http 端点,因此请使用 HTTP 以避免进一步的警告和复杂情况,即 https://testrli.blob.core.windows.net/test3/EO
  2. 请更新您的连接字符串以使用正确的证书

上传正在尝试恢复之前的上传,但在上传期间连接从服务器端关闭。有时恢复上传可能会出现这些错误,因此重新上传确实有帮助。

此外,我建议使用 Powershell(下载最新的 0.6.11)并启用 $DebugPreference ='Continue' 以这种方式在控制台上查看请求和响应,如果您遇到任何问题,您将知道可能的原因。

以下是用于将 VM 上传到 Windows Azure 的 PS 脚本: http://michaelwasham.com/2013/01/04/migrate-a-virtual-machine-to-windows-azure-with-powershell/

同时将您的问题报告给 Windows Azure VM Forums如果问题仍然存在,从各自团队获得 1:1 支持。

关于azure - 无法将 VHD 上传到 azure 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15392168/

相关文章:

azure - 在 Linux 中将 azure blob 存储挂载为驱动器

c# - 从内存流上传到 azure 存储返回空文件

c# - 如何在Azure blob存储中保留空目录?

azure - 在ARM模板中获取Azure存储dacpac文件

azure - 如何监控 Azure 中应用程序的事件?

azure - Windows Azure Blob 存储模拟器文件存储位置

c# - Azure 存储 blob 无法加载文件或程序集“System.Diagnostics.DiagnosticSource,Version=4.0.4.0,Culture=neutral,PublicKeyToken=cc7b13ffcd”

Azure CLI : storage blob delete-batch to delete all blobs excluding two directories

azure - 如何通过 Log Analytics API 访问 AppInsights 请求数据?

c# - 应用程序能否识别它是在云端运行还是在普通服务器上运行?