1

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

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
4

1 回答 1

1

这里有几点需要注意。

  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 论坛报告您的问题,以获得相应团队的 1:1 支持。

于 2013-03-13T17:46:40.957 回答