0
我需要配置一個調用建立在遠程服務器上的jenkins的NIFI流。 curl命令從我nifi主機從NIFI調用extern REST服務
curl "http://sktpprdjci01.ccta.dk/jenkins/job/prod-jobs-batch/job/testModel02_batch/buildWithParameters?token=8eabad81fd14bb3f0e8a&model_args=20170829"
我試着去配置NIFI InvokeHTTP處理器從以下設置nifi流中撥打電話的CMD線工作正常。
RemoteURL:http://myuser:[email protected]/jenkins/job/prod-jobs-batch/job/testModel02_batch/buildWithParameters?token=8eabad81fd14bb3f0e8a&model_args=20170829
Attributes To Send: Content-Type=application/xml (have tried with json)
Basic Authentication Username: myuser
Basic Authentication Password: mypassword
但它仍然在no重試隊列中運行。 我如何根據curl命令配置我的InvokeHTTP,它工作正常。
捲曲突擊隊的詳細輸出
[[email protected] test]$ curl --verbose"http://w19612adm:[email protected]/jenkins/job/prod-jobs-batch/job/testModel02_batch/buildWithParameters?token=8eabad81fd14bb3f0e8a&model_args=20170829"
* About to connect() to sktpprdjci01.ccta.dk port 80 (#0)
* Trying 172.20.242.59...
* Connected to sktpprdjci01.ccta.dk (172.20.242.59) port 80 (#0)
* Server auth using Basic with user 'w19612adm'
> GET /jenkins/job/prod-jobs-batch/job/testModel02_batch/buildWithParameters?token=8eabad81fd14bb3f0e8a&model_args=20170829 HTTP/1.1
> Authorization: Basic dzE5NjEyYWRtOjYyZGUzZjEwODY3ZTgzOTNkOGRmNDdiMTJmY2Y4ODk3
> User-Agent: curl/7.29.0
> Host: sktpprdjci01.ccta.dk
> Accept: */*
>
< HTTP/1.1 201 Created
< Server: nginx/1.10.2
< Date: Thu, 31 Aug 2017 09:39:13 GMT
< Content-Length: 0
< Connection: keep-alive
< X-Content-Type-Options: nosniff
< Location: http://sktpprdjci01.ccta.dk/jenkins/queue/item/2601/
<
* Connection #0 to host sktpprdjci01.ccta.dk left intact
[[email protected] test]$
Attrributes上flowfile在無重試關係
model_args 20170829
invokehttp.tx.id f1f3074e-007c-40e4-8e1d-4ef7c4ea7f62
file.group nifi
file.lastModifiedTime 2017-08-29T13:58:12+0200
invokehttp.status.code 407
invokehttp.response.body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content- Type" content="text/html; charset=UTF-8"> <title>Notification: Proxy Authorization Required</title> <style type="
file.permissions rwxrwxrwx
uuid e6d95b8d-5385-4463-98cf-2982734d1bc4
token 8eabad81fd14bb3f0e8a
absolute.pat /opt/nifi/ekapital/ek_abt/
invokehttp.request.url http://ktpprdjci01.ccta.dk/jenkins/job/prod-jobs-batch/job/testModel02_batch/buildWithParameters?token=8eabad81fd14bb3f0e8a&model_args=20170829
path/
filename ek_abt.hql
file.creationTime 2017-08-29T13:58:12+0200
file.lastAccessTime 2017-08-30T14:03:15+0200
file.owner nifi
invokehttp.status.message Proxy Authentication Required
OK
運行'捲曲--verbose ...'和發佈導致你的問題。根據[文檔],'no retry'關係可以提供新的屬性(https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.3.0/ org.apache.nifi.processors.standard.InvokeHTTP/index.html中)。請在'no retry'關係後檢查flowfile是否存在新的屬性並添加到問題中。 – daggett