无法从自动化帐户管理Azure Data Lake Store Gen1 [英] Unable to manage Azure Data Lake Store Gen1 from Automation Account

查看:57
本文介绍了无法从自动化帐户管理Azure Data Lake Store Gen1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试自动构建数据传输管道,使用Azure Data Factory将数据移动到Azure DataLake Store Gen1帐户中的存储结构中。


powershell我用来构建解决方案的脚本可以在本地Powershell控制台甚至Azure Cloud shell中正常工作,但出于安全原因,我想将脚本移动到Azure自动化帐户Runbook中。


但是,管理Datalake文件夹的命令在Powershell Runbook中失败。


尝试了AZ和AzureRM命令和模块的各种组合,尝试较旧和较新的模块等,但我一直无法找到可在自动化帐户中使用的环境和模块版本等的组合。


以下是我的测试结果:


环境1


Automation Runbook


使用的Datalake模块是:
          Az.DatalakeStore - VERSION 1.1.0




ERRROR RESULT: 



New-AzureRMDataLakeStoreItem:获取路径/ 04-Consumer-Zone / projecttest的元数据时出错。



操作:GETFILESTATUS失败,并且出现未知错误:必须使用适当的
修改'User-Agent'标题



属性或方法。



参数名:名称源:系统堆栈跟踪:   在System.Net.WebHeaderCollection.ThrowOnRestrictedHeader(字符串



headerName)



   at System.Net.WebHeaderCollection.Set(String name,String value)



  在Microsoft.Azure.DataLake.Store.WebTransport.AssignCommonHttpHeaders(HttpWebRequest webReq,AdlsClient客户端,


< p style ="margin-bottom:0cm; margin-bottom:.0001pt; line-height:normal; background:#191919; word-break:break-all">
RequestOptions REQ,字符串令牌,字符串opMethod,IDictionary`2 customHeaders,的Int32 postRequestLength)



&NBSP;&NBSP;在Microsoft.Azure.DataLake.Store.WebTransport< MakeSingleCallAsync> d__22.MoveNext()





上次遇到5次尝试后抛出异常。['User-Agent'标题必须使用适当的
修改



属性或方法。



参数名称:名称,必须使用适当的属性或方法修改'User-Agent'标题。



参数名称:名称,必须使用适当的属性或方法修改'User-Agent'标题。



参数名称:名称,必须使用适当的属性或方法修改'User-Agent'标题。



参数名称:名称,必须使用适当的属性或方法修改'User-Agent'标题。



参数名称:名称]



[ServerRequestId:]



在线:49个字符:1



+ New-AzureRMDataLakeStoreItem -Account $ datalakeStorageGen1Name -Path  ...



+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~



&NBSP;&NBSP;&NBSP; + CategoryInfo&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;:CloseError:(:) [新-AzDataLakeStoreItem],AdlsException



    + FullyQualifiedErrorId:Microsoft.Azure.Commands.DataLakeStore.NewAzureDataLakeStoreItem





Environment 2


Automation Runbook


<跨度>使用的Datalake模块是:<跨度>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;          
AzureRM.DatalakeStore - VERSION 6.2.1


< p style ="margin-bottom:0cm;边距:.0001pt; line-height:normal">



ERROR RESULT:



New-AzureRMDataLakeStoreItem:帐户名称adlsropr.azuredatalakestore.net/无效。指定完整帐户



包括域名。



在行:42字符:1



+ New-AzureRMDataLakeStoreItem -AccountName $ dataLakeStorageGen1Name -P ...



+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~



    + CategoryInfo          ;: CloseError :( :) [New-AzureRmDataLakeStoreItem],ArgumentException



    + FullyQualifiedErrorId:Microsoft.Azure.Commands.DataLakeStore.NewAzureDataLakeStoreItem






环境3


Automation Runbook


<跨度>使用的Datalake模块是:<跨度>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;          
AzureRM.DatalakeStore - VERSION 5.1.0


< p style ="margin-bottom:0cm;边距:.0001pt; line-height:normal"> 注意: 
据报道,版本5.1.0修复了错误,引用了Datalake的名称正确,这在上面的测试中使用了最新的AzureRM模块版本




ERROR RESULT:



New-AzureRMDataLakeStoreItem:Operation返回无效状态代码'Forbidden'



在行:42字符:1



+ New-AzureRMDataLakeStoreItem -AccountName $ dataLakeStorageGen1Name -P ...



+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~



    + CategoryInfo          ;: CloseError :( :) [New-AzureRmDataLakeStoreItem],AdlsErrorException



    + FullyQualifiedErrorId:Microsoft.Azure.Commands.DataLakeStore.NewAzureDataLakeStoreItem





Environment 4


Portal提供的Cloud Shell会话从一圈"margin-bottom:0cm; margin-bottom:.0001pt; line-height:normal;"> Datalake模块正在运行:<跨度>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;        
Az.DatalakeStore - VERSION 1.1.0




ERROR RESULT:


无....这个有用



注意:尽管在脚本中使用AzureRM命令,甚至没有要求加载AzureRM模块。我假设云shell会话只是启用-Alias。




Environment 5


Std本地PowerShell会话从一圈运行"margin-bottom:0cm; margin-bottom:.0001pt; line-height:normal;"> 正在使用的Datalake模块:<跨度>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;       
AzureRM.DatalakeStore - VERSION 6.1.2




ERROR RESULT:


无...。这可行



********* ***********************************


有什么帮助模块的组合将管理Runbook会话中的Datalake。


.Rob



解决方案

Hello Rab1967,很想知道升级到模块后是否得到相同的结果

版本6.13.0
自动化帐户?尝试使用
更新Azure模块runboo
k。


如果问题仍然存在,请告诉我们。


干杯。


I have been trying to Automate the build of a Data Transfer Pipeline that moves data using Azure Data Factory into a storage structure in Azure DataLake Store Gen1 Account.

The powershell scripts I used to build the solution work fine from a local Powershell console and even in Azure Cloud shell, but I wanted to move the scripts into an Azure Automation Account Runbook for security reasons.

However, the commands to manage the Datalake folders failed in the Powershell Runbooks.

Various combinations of AZ and AzureRM commands and modules have been attempted, attempting older and newer modules etc, but I have been unable to find a combination of environment and module versions etc that will work in an Automation account.

Here were my test results:

Environment 1

Automation Runbook

Datalake module in use is :           Az.DatalakeStore – VERSION 1.1.0

ERRROR RESULT: 

New-AzureRMDataLakeStoreItem : Error in getting metadata for path /04-Consumer-Zone/projecttest.

Operation: GETFILESTATUS failed with   Unknown Error: The 'User-Agent' header must be modified using the appropriate

property or method.

Parameter name: name Source: System StackTrace:    at System.Net.WebHeaderCollection.ThrowOnRestrictedHeader(String

headerName)

   at System.Net.WebHeaderCollection.Set(String name, String value)

   at Microsoft.Azure.DataLake.Store.WebTransport.AssignCommonHttpHeaders(HttpWebRequest webReq, AdlsClient client,

RequestOptions req, String token, String opMethod, IDictionary`2 customHeaders, Int32 postRequestLength)

   at Microsoft.Azure.DataLake.Store.WebTransport.<MakeSingleCallAsync>d__22.MoveNext().

.

Last encountered exception thrown after 5 tries. [The 'User-Agent' header must be modified using the appropriate

property or method.

Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method.

Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method.

Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method.

Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method.

Parameter name: name]

[ServerRequestId:]

At line:49 char:1

+ New-AzureRMDataLakeStoreItem -Account $datalakeStorageGen1Name -Path  ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : CloseError: (:) [New-AzDataLakeStoreItem], AdlsException

    + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeStore.NewAzureDataLakeStoreItem

Environment 2

Automation Runbook

Datalake module in use is :                           AzureRM.DatalakeStore – VERSION 6.2.1

ERROR RESULT:

New-AzureRMDataLakeStoreItem : Account name adlsropr.azuredatalakestore.net/ is invalid. Specify the full account

including the domain name.

At line:42 char:1

+ New-AzureRMDataLakeStoreItem -AccountName $dataLakeStorageGen1Name -P ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : CloseError: (:) [New-AzureRmDataLakeStoreItem], ArgumentException

    + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeStore.NewAzureDataLakeStoreItem

Environment 3

Automation Runbook

Datalake module in use is :                           AzureRM.DatalakeStore – VERSION 5.1.0

Note:  Version 5.1.0 was reported to fix errors with referencing name of Datalake correctly which was shown in the above test using the latest AzureRM module version

ERROR RESULT:

New-AzureRMDataLakeStoreItem : Operation returned an invalid status code 'Forbidden'

At line:42 char:1

+ New-AzureRMDataLakeStoreItem -AccountName $dataLakeStorageGen1Name -P ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : CloseError: (:) [New-AzureRmDataLakeStoreItem], AdlsErrorException

    + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeStore.NewAzureDataLakeStoreItem

Environment 4

Portal presented Cloud Shell session running from a lap"margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;">Datalake Module in use :                               Az.DatalakeStore – VERSION 1.1.0

ERROR RESULT:

None…. This works

Note: There wasn’t even a requirement to load AzureRM modules despite using AzureRM commands in script. I assume cloud shell session simply enable-Alias.

Environment 5

Std Local PowerShell session running from lap"margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;">Datalake Module in use :                               AzureRM.DatalakeStore – VERSION 6.1.2

ERROR RESULT:

None…. This works

********************************************

Some help on what combination of modules will manage Datalake from a runbooks sessions would be mush appreciated.

.Rob

解决方案

Hello Rab1967, curious to know if you get the same result after upgrading to module version 6.13.0 on the Automation Account? Try using the update Azure Module runbook.

Let us know if issue persists.

Cheers.


这篇关于无法从自动化帐户管理Azure Data Lake Store Gen1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆