Member since
11-13-2020
3
Posts
0
Kudos Received
0
Solutions
11-14-2020
10:28 AM
I have attched nifi configuration file in this url https://www.dropbox.com/s/dyvxduepz94vwct/simple_request_response_template.xml?dl=0 please check and let me know any issue in configuration settings
... View more
11-14-2020
10:00 AM
@stevenmatison for me it always comes , regarding " If you test the flow entirely with a single request do you still get the error?" do you mean single request instead of multipart-form data? Is there any way i can fix the active connection to the original request?
... View more
11-13-2020
11:40 AM
I am using the below Nifi processors HandleHttpRequest -> RouteOnAttribute -> HandleHttpResponse My RouteOnAttribute property is test and value is ${http.headers.type:contains('test')} Below is the sample client request which i sent to nifi server and i am getting response code as 200 same i have mentioned in HandleHttpResponse's http status code which means my configured the processor correctly import requests import json import traceback nifi_url = "http://localhost:8009/report" def uploadLogs(fileName): f = open(fileName, 'rb') payload = { "this": "that" } files = {'info': (None, json.dumps(payload), 'application/json; charset=utf-8'), 'file': ('current', f, "text/plain; charset=us-ascii")} headers = {'type': 'test', "Keep-Alive": "timeout=100", "Content-Transfer-Encoding": "8bit", "Connection": "Keep-Alive"} url = '' try: url = nifi_url response = requests.post(url, files=files, headers=headers) print(response.status_code) if (response != None and (response.status_code == 200 or response.status_code == 201)): return True except: traceback.print_exc() return False filename = "C:\\sample.txt" print(uploadLogs(filename)) Still i am getting below error i would like to know is this error expected if not why i am getting below error and how to fix this error. Any help is appreciated nifi_1 | 2020-11-13 19:14:09,360 ERROR [Timer-Driven Process Thread-7] o.a.n.p.standard.HandleHttpResponse HandleHttpResponse[id=39d755ed-f825-3013-ce47-5218721d27d4] Failed to respond to HTTP request for StandardFlowFileRecord[uuid=1a422f48-41e3-4eb9-9390-73b12762c5dc,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1605269814303-549, container=default, section=549], offset=39642, length=16],offset=0,name=1a422f48-41e3-4eb9-9390-73b12762c5dc,size=16] because FlowFile had an 'http.context.identifier' attribute of 5e7dc338-8684-491d-a554-6392e2a0e3b9 but could not find an HTTP Response Object for this identifier
... View more
Labels:
- Labels:
-
Apache NiFi