本文介绍了无法使用AzCopy v10将文件从本地服务器复制到Azure Blob存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

服务器:Ubuntu 1604
$
AzCopy:10.1.2

描述:我想使用azcopy将一些文件上传到azure blob存储,所以我生成一个过期时间为半年的SAS令牌,我可以先将文件成功上传到azure blob存储容器,但过了一段时间(可能是几个小时)
上传过程失败了,这就是日志文件中的错误:

Server: Ubuntu 1604
AzCopy: 10.1.2
Description: I'd like to upload some files to azure blob storage using azcopy, so I generated a SAS token with an expiration time of half a year, I can upload the files to azure blob storage container successfully at first, but after a while(maybe a few hours) the upload process failed, and this is the error in log file:

2019/06/03 01:36:57 AzcopyVersion  10.1.2

2019/06/03 01:36:57 OS-Environment  linux

2019/06/03 01:36:57 OS-Architecture  amd64

2019/06/03 01:36:57 Job-Command cp / xxx / xxx https:// xxx / xxx / xxx

2019/06/03 01 :36:57 CPU数量:8

2019/06/03 01:36:57最大文件缓冲区RAM 4.000 GB

2019/06/03 01:36: 57下载时最大打开文件:1047946

2019/06/03 01:36:57最大并发转移启动程序:64

2019/06/03 01:36: 57 JobID = 7b5c2836-6a5b-d749-5a55-64bef9244c66,凭证类型:匿名

2019/06/03 01:36:57 PERF:主要性能约束为未知。国家:R:  0,D:  0,W:  0,F:  0,B:  0,T:  0
$
2019/06/03 01:36:57调度JobID = 7b5c2836-6a5b-d749-5a55-64bef9244c66,Part#= 0,Transfer#= 0,priority = 0

2019/06/03 01:36:57信息:[P#0-T#0]工人30正在处理TRANSFER

2019/06/03 01:36:57 INFO :[P#0-T#0]开始转移:来源"/ xxx / xxx"目的地"https:// xxx / xxx / xxx"。指定的块大小8388608

2019/06/03 01:36:57 ==>外出请求(Try = 1)

   PUT https:// xxx / xxx / xxx?timeout = 901

  内容长度:[1778]

   User-Agent:[AzCopy / 10.1.2 Azure-Storage / 0.6(go1.10.8; linux)]

   X-Ms-Blob-Cache-Control:[]

   X-Ms-Blob-Content-Disposition:[]

   X-Ms-Blob-Content-Encoding:[]

   X-Ms-Blob-Content-Language:[]

   X-Ms-Blob-Content-Md5:[]

   X-Ms-Blob-Content-Type:[text / plain; charset = utf-8]

   X-Ms-Blob-Type:[BlockBlob]

   X-Ms-Client-Request-Id:[490b332b-a884-4c2c-4b98-914ed67a7503]

   X-Ms-Version:[2018-03-28]
2019/06/03 01:36:57 AzcopyVersion  10.1.2
2019/06/03 01:36:57 OS-Environment  linux
2019/06/03 01:36:57 OS-Architecture  amd64
2019/06/03 01:36:57 Job-Command cp /xxx/xxx https://xxx/xxx/xxx
2019/06/03 01:36:57 Number of CPUs: 8
2019/06/03 01:36:57 Max file buffer RAM 4.000 GB
2019/06/03 01:36:57 Max open files when downloading: 1047946
2019/06/03 01:36:57 Max concurrent transfer initiation routines: 64
2019/06/03 01:36:57 JobID=7b5c2836-6a5b-d749-5a55-64bef9244c66, credential type: Anonymous
2019/06/03 01:36:57 PERF: primary performance constraint is Unknown. States: R:  0, D:  0, W:  0, F:  0, B:  0, T:  0
2019/06/03 01:36:57 scheduling JobID=7b5c2836-6a5b-d749-5a55-64bef9244c66, Part#=0, Transfer#=0, priority=0
2019/06/03 01:36:57 INFO: [P#0-T#0] has worker 30 which is processing TRANSFER
2019/06/03 01:36:57 INFO: [P#0-T#0] Starting transfer: Source "/xxx/xxx" Destination "https://xxx/xxx/xxx". Specified chunk size 8388608
2019/06/03 01:36:57 ==> OUTGOING REQUEST (Try=1)
   PUT https://xxx/xxx/xxx?timeout=901
   Content-Length: [1778]
   User-Agent: [AzCopy/10.1.2 Azure-Storage/0.6 (go1.10.8; linux)]
   X-Ms-Blob-Cache-Control: []
   X-Ms-Blob-Content-Disposition: []
   X-Ms-Blob-Content-Encoding: []
   X-Ms-Blob-Content-Language: []
   X-Ms-Blob-Content-Md5: []
   X-Ms-Blob-Content-Type: [text/plain; charset=utf-8]
   X-Ms-Blob-Type: [BlockBlob]
   X-Ms-Client-Request-Id: [490b332b-a884-4c2c-4b98-914ed67a7503]
   X-Ms-Version: [2018-03-28]

推荐答案

尝试引用此
中提到的建议GitHub

由于实际上是密钥,可能会发生某个时间问题,你需要完整的"查询字符串"。执行复制操作。如下所示。

?sv = 2018-03-28& si = gcdsbuild-16653BAF00A& sr = s& sig =< retracted_SAS>



你能  卸载
新版本并重新安装旧版本的AZcopy工具"MicrosoftAzureStorageTools.msi" 
并让我知道状态?

Can you uninstalled the new version and reinstalled from an older version of the AZcopy tool "MicrosoftAzureStorageTools.msi" and let me know the status?




其他信息;
确保您已设置  required
headers
  like 
x -ms-date  和  x-ms-blob-type  和
您使用  PUT  动词。您使用 
授权  标题。
见:


Additional information;
Ensure you have set the required headers like x-ms-date and x-ms-blob-type and that you use the PUT verb. You pass your credentials using the Authorization header. See:


Azure存储服务的授权
<

最简单的生成SAS的方法是通过。请参阅  ./ azcopy cp --help   for
关于如何使用复制命令的示例。

您还可以使用OAuth对存储服务进行身份验证(您可以通过  ./ azcopy
登录




这篇关于无法使用AzCopy v10将文件从本地服务器复制到Azure Blob存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 00:58