部署Data Factory ARM模板时出错

时间:2019-06-24 14:26:39

标签: azure azure-data-factory-2

一直在将ADFv2 ARM模板部署到同一资源组内的另一个数据工厂中,并且也将存储帐户也部署在同一RG中,而当我进行部署时,某些链接服务出现错误。

我具有使用Selfhosted-IR连接计算机和本地数据库服务器的链接服务,两者均失败。 我正在传递链接服务的Override参数。

非常感谢您的帮助。

谢谢。

"error": {
    "code": "BadRequest",
    "message": "Failed to encrypt`` sub-resource payload {\r\n  \"Id\": \"/subscriptions/xxxxxxxxx/resourceGroups/rgvs/providers/Microsoft.DataFactory/factories/TestADF/linkedservices/ConnOnPremComputer\",\r\n  \"Name\": \"ConnOnPremComputer\",\r\n  \"Properties\": {\r\n    \"annotations\": [],\r\n    \"type\": \"FileServer\",\r\n    \"typeProperties\": {\r\n      \"host\": \"****************\",\r\n      \"userId\": \"************\",\r\n      \"password\": \"*************\"\r\n    },\r\n    \"connectVia\": {\r\n      \"referenceName\": \"OnPremToAzure\",\r\n      \"type\": \"IntegrationRuntimeReference\"\r\n    }\r\n  }\r\n} and error is: Failed to encrypted linked service credentials on self-hosted IR 'OnPremToAzure', reason is: NotFound, error message is: No online instance..",
    "target": "/subscriptions/xxxxxxxxxx/resourceGroups/rgvs/providers/Microsoft.DataFactory/factories/TestADF/linkedservices/ConnOnPremComputer",
    "details": null
  }
} undefined
2019-06-24T13:54:48.9695328Z ##[error]BadRequest: {
  "error": {
    "code": "BadRequest",
    "message": "Failed to encrypt sub-resource payload {\r\n  \"Id\": \"/subscriptions/xxxxxxxxx/resourceGroups/rgvs/providers/Microsoft.DataFactory/factories/balptestadf/linkedservices/ConnLocalHostBackOffice\",\r\n  \"Name\": \"ConnLocalHostBackOffice\",\r\n  \"Properties\": {\r\n    \"parameters\": {\r\n      \"Password\": {\r\n        \"type\": \"String\",\r\n        \"defaultValue\": \"Password@1234\"\r\n      }\r\n    },\r\n    \"annotations\": [],\r\n    \"type\": \"SqlServer\",\r\n    \"typeProperties\": {\r\n      \"connectionString\": \"***************\",\r\n      \"userName\": \"***************\",\r\n      \"password\": \"*****************\"\r\n    },\r\n    \"connectVia\": {\r\n      \"referenceName\": \"OnPremToAzure\",\r\n      \"type\": \"IntegrationRuntimeReference\"\r\n    }\r\n  }\r\n} and error is: Format of the initialization string does not conform to specification starting at index 0..",
    "target": "/subscriptions/xxxxxxxxxxxx/resourceGroups/rgvs/providers/Microsoft.DataFactory/factories/testADF/linkedservices/ConnLocalHost",
    "details": null
  }
} undefined

1 个答案:

答案 0 :(得分:0)

此错误消息的原因很多:

从错误消息“ 无法在自托管IR'OnPremToAzure”上加密加密的链接服务凭据,原因是:未找到,错误消息是:没有在线实例

在部署时,请确保自托管IR处于联机状态。否则,您可能会收到此错误消息,因为将使用自托管的IR来加密您的有效负载。

要在本地自托管集成运行时上从JSON有效负载加密敏感数据,请运行New-AzDataFactoryV2LinkedServiceEncryptedCredential,然后传递JSON有效负载。此cmdlet确保使用DPAPI对凭据进行加密并将其存储在本地的自托管集成运行时节点上。可以将包含对凭证的加密引用的输出有效负载重定向到另一个JSON文件(在本例中为“ encryptedLinkedService.json”)。

New-AzDataFactoryV2LinkedServiceEncryptedCredential -DataFactoryName $dataFactoryName -ResourceGroupName $ResourceGroupName -Name "SqlServerLinkedService" -DefinitionFile ".\SQLServerLinkedService.json" > encryptedSQLServerLinkedService.json

有关更多详细信息,请参阅“ Encrypt credentials for on-premise data stores in ADF”。

希望这会有所帮助。