Azure webjobs 从Azure数据工厂管道调用Webjob引发HTTP 409冲突异常错误
我有一个OnDemand触发的webjob,我想通过使用HTTP链接服务的ADF复制活动触发它。以下是链接服务:-Azure webjobs 从Azure数据工厂管道调用Webjob引发HTTP 409冲突异常错误,azure-webjobs,azure-data-factory,Azure Webjobs,Azure Data Factory,我有一个OnDemand触发的webjob,我想通过使用HTTP链接服务的ADF复制活动触发它。以下是链接服务:- { "name": "LS_WebJob", "properties": { "hubName": "yas-cdp-adf_hub", "type": "Http", "typeProperties": { "url": "https://cust-app.scm.azurewebsites.
{
"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_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"
}
}
我的webjob是一个简单的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)冲突,源=系统'
尝试将网关名称添加到链接服务json中。请参阅此链接 如果手动调用WebJobs,您是否也会得到409?如果没有,请尝试确定回复@David的两个调用之间的差异。正如我提到的,无论是手动运行还是通过ADF,webjob都被成功触发。这里非常混乱,因为您的标题暗示webjob使用409失败。你是说对WebJob的http调用实际上根本没有失败,但只有ADF失败了吗?如果是这样,这个问题可能与WebJobs无关。试着孤立一下。谢谢大卫,我改变了标题,希望它现在有意义。你现在能提出解决方案吗?还不清楚。是http请求调用返回409的webjob,还是其他返回409的东西?您在上面写道,webjob被手动和通过ADF成功调用,这意味着200个响应,这似乎是矛盾的。