1

I've deployed a simple dataflow: HandleHttpRequest - PutKafka - HandleHttpResponse.

NIFI throws a "transfer relationship not specified" error, but not always. Can anyone help me to understand why?

Here is the error information:

2016-05-23 14:57:00,126 ERROR [Timer-Driven Process Thread-104] o.a.n.p.standard.HandleHttpRequest HandleHttpRequest[id=3858f0ad-b165-427b-a460-67fbf7cff0d8] HandleHttpRequest[id=3858f0ad-b165-427b-a460-67fbf7cff0d8] failed to process due to 
org.apache.nifi.processor.exception.FlowFileHandlingException: 

StandardFlowFileRecord[uuid=ce7c98ae-d7f5-47ea-8a32-6a3834c85720,claim=StandardContentClaim 
[resourceClaim=StandardResourceClaim[id=1464006858837-110, container=default, section=110], offset=452435, length=0],offset=0,name=277074787796569,size=0] transfer relationship not specified; rolling back session: org.apache.nifi.processor.exception.FlowFileHandlingException: 

StandardFlowFileRecord[uuid=ce7c98ae-d7f5-47ea-8a32-6a3834c85720,claim=StandardContentClaim   
[resourceClaim=StandardResourceClaim[id=1464006858837-110, container=default, section=110], offset=452435, length=0],offset=0,name=277074787796569,size=0] transfer relationship not specified
org.apache.nifi.processor.exception.FlowFileHandlingException: 

StandardFlowFileRecord[uuid=ce7c98ae-d7f5-47ea-8a32-6a3834c85720,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1464006858837-110, container=default, section=110], offset=452435, length=0],offset=0,name=277074787796569,size=0] transfer relationship not specified
2016-05-23 14:57:00,127 ERROR [Timer-Driven Process Thread-104] o.a.n.p.standard.HandleHttpRequest HandleHttpRequest[id=3858f0ad-b165-427b-a460-67fbf7cff0d8] 

Failed to process session due to org.apache.nifi.processor.exception.FlowFileHandlingException: 

StandardFlowFileRecord[uuid=ce7c98ae-d7f5-47ea-8a32-6a3834c85720,claim=StandardContentClaim 
[resourceClaim=StandardResourceClaim[id=1464006858837-110, container=default, section=110], offset=452435, length=0],offset=0,name=277074787796569,size=0] transfer relationship not specified: org.apache.nifi.processor.exception.FlowFileHandlingException: 

StandardFlowFileRecord[uuid=ce7c98ae-d7f5-47ea-8a32-6a3834c85720,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1464006858837-110, container=default, section=110], offset=452435, length=0],offset=0,name=277074787796569,size=0] transfer relationship not specified
org.apache.nifi.processor.exception.FlowFileHandlingException: 

StandardFlowFileRecord[uuid=ce7c98ae-d7f5-47ea-8a32-6a3834c85720,claim=StandardContentClaim    [resourceClaim=StandardResourceClaim[id=1464006858837-110, container=default, section=110], offset=452435, length=0],offset=0,name=277074787796569,size=0] transfer relationship not specified

Here follows an image of the error:

HandleHttpRequest Error

Thanks a lot.

4

1 回答 1

3

Seeing the log message "could not process it because too many requests are already outstanding; responding with SERVICE_UNAVAILABLE", I believe this is the result of a coding bug. The broad answer is that the processor isn't properly handling the created FlowFile when it fails to talk to the Context Map.

More specifically in this[1] code block, the processor failed to registered the request in the Context Map Controller service and is responding with a 503 response. The problem is that the processor has already created a FlowFile in this session here[2], and in the responding code block the FlowFile is neither transferred nor removed. What it should be doing, is removing the FlowFile from the session after it is created and hits an error, like it does earlier in the OnTrigger[3].

I've actually already created a ticket[4] and fix[5]. I merged the fix into the 0.x and master branches.

[1]https://github.com/apache/nifi/blob/9064b976317e316f42ac279dd026105b54a17ddb/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java#L601-L601 [2]https://github.com/apache/nifi/blob/9064b976317e316f42ac279dd026105b54a17ddb/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java#L483 [3]https://github.com/apache/nifi/blob/9064b976317e316f42ac279dd026105b54a17ddb/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java#L489-L489 [4]https://issues.apache.org/jira/browse/NIFI-1913 [5]https://github.com/apache/nifi/pull/462

于 2016-05-24T14:25:08.720 回答