【发布时间】:2018-03-13 13:38:44
【问题描述】:
我有一个 OnDemand 触发的网络作业,我想使用 HTTP 链接服务通过 ADF 复制活动来触发它。这是链接服务:-
{
"name": "LS_WebJob",
"properties": {
"hubName": "yas-cdp-adf_hub",
"type": "Http",
"typeProperties": {
"url": "https://cust-app.scm.azurewebsites.net/api/triggeredwebjobs/ConsoleApplication1/run",
"authenticationType": "Basic",
"username": "$custdata-app",
"password": "**********"
}
}
}
输入数据集
{
"name": "ZZ_Inp_Webjob",
"properties": {
"published": false,
"type": "Http",
"linkedServiceName": "LS_WebJob",
"typeProperties": {
"requestMethod": "Post",
"requestBody": "Hey Buddy"
},
"availability": {
"frequency": "Day",
"interval": 1,
"style": "StartOfInterval"
},
"external": true,
"policy": {}
}
}
输出数据集
{
"name": "ZZ_Out_WebJob",
"properties": {
"published": false,
"type": "AzureBlob",
"linkedServiceName": "LS_ABLB",
"typeProperties": {
"fileName": "webjob.json",
"folderPath": "yc-cdp-container/Dummy/temp",
"format": {
"type": "TextFormat"
}
},
"availability": {
"frequency": "Day",
"interval": 1,
"style": "StartOfInterval"
}
}
}
管道
{
"name": "ZZ-PL-WebJob",
"properties": {
"description": "This pipeline copies data from an HTTP Marina WiFi Source URL to Azure blob",
"activities": [
{
"type": "Copy",
"typeProperties": {
"source": {
"type": "HttpSource"
},
"sink": {
"type": "BlobSink",
"writeBatchSize": 0,
"writeBatchTimeout": "00:00:00"
}
},
"inputs": [
{
"name": "ZZ_Inp_Webjob"
}
],
"outputs": [
{
"name": "ZZ_Out_Webjob"
}
],
"policy": {
"timeout": "01:00:00",
"concurrency": 1
},
"scheduler": {
"frequency": "Day",
"interval": 1,
"style": "StartOfInterval"
},
"name": "WebjobSourceToAzureBlob",
"description": "Copy from an HTTP source to an Azure blob"
}
],
"start": "2017-04-10T01:00:00Z",
"end": "2017-04-10T01:00:00Z",
"isPaused": false,
"hubName": "yas-cdp-adf_hub",
"pipelineMode": "Scheduled"
}
}
我的网络作业是一个简单的 C# 应用程序:-
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("My Team Rocks!");
}
}
}
当我执行管道时,webjob 被成功触发。但是,管道因 HTTP 409 冲突错误而失败。
复制活动在源端遇到用户错误: ErrorCode=UserErrorFailedToReadHttpFile,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed 从 http 源读取数据 file.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.WebException,Message=The 远程服务器返回错误:(409) Conflict.,Source=System,'.
【问题讨论】:
-
如果您手动调用 WebJobs,您是否也会得到 409?如果不是,请尝试识别两次调用之间的差异
-
感谢@David 的回复。正如我提到的,无论是手动运行还是通过 ADF,webjob 都已成功触发。
-
这里很困惑,因为您的标题暗示 WebJob 以 409 失败。您是说对 WebJob 的 http 调用实际上根本没有失败,但只有 ADF 失败了?如果是这样,那么问题可能与 WebJobs 无关。尝试隔离。
-
谢谢大卫,我改了标题,希望现在有意义。您现在可以提出解决方案吗?
-
还是不清楚。这是调用返回 409 的 webjob 的 http 请求,还是返回 409 的其他东西?您在上面写道,手动和通过 ADF 都成功调用了 webjob,这意味着 200 响应,这似乎是矛盾的。
标签: azure-webjobs azure-data-factory