[ https://issues.apache.org/jira/browse/NIFI-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981133#comment-15981133 ]
ASF GitHub Bot commented on NIFI-1336: -------------------------------------- Github user markap14 commented on the issue: https://github.com/apache/nifi/pull/1642 @trixpan sorry - the email that github sent me got lost in my inbox. Just saw it. I think the logic here is still not quite right, though. And I think I may have actually misunderstood what was happening initially, as well. If unable to delete the 'hold' that the other side places on the FlowFile, PostHTTP enters a loop of continually attempting to delete the hold, until it gets a response back. If an IOException occurs, with the logic you added in, it will route to failure and then the next iteration of the loop will try to transfer the FlowFile again. I think the best approach would be to limit the loop to happen some number of times (e.g., 3 or 5 or 10 times) and if unable to communicate with the remote instance for that number of times, at that point we should route to failure and return. We used a loop here, I think, because we don't want to send say 1 GB of data and then have a garbage collection or a network hiccup or whatever prevent the delete and have to re-transmit all that data. So a few retries is likely a good idea. We should probably also not be logging the errors/stack traces until we finish retrying though. > PostHTTP does not route to failure in case of Connection failure > ---------------------------------------------------------------- > > Key: NIFI-1336 > URL: https://issues.apache.org/jira/browse/NIFI-1336 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions > Reporter: Mark Payne > Assignee: Andre F de Miranda > > When unable to communicate with a remote NiFi instance, PostHTTP continually > rolls back the session (without penalizing) instead of routing to failure. > This results in filling the logs with messages like: > 2015-12-29 14:09:02,023 WARN [Timer-Driven Process Thread-11] > o.a.nifi.processors.standard.PostHTTP > PostHTTP[id=015d5ace-3aa3-3e51-8aae-4776d3bd3897] Failed to delete Hold that > destination placed on > [StandardFlowFileRecord[uuid=220fbcac-d84e-41ed-9cc7-6e558ea207ee,claim=StandardContentClaim > [resourceClaim=StandardResourceClaim[id=1451397424256-4, container=pub1, > section=4], offset=52418, > length=19672005],offset=0,name=GeoLite2-City.mmdb.gz,size=19672005]] due to > org.apache.http.conn.HttpHostConnectException: Connect to processing-3:5000 > [processing-3/172.172.172.172] failed: Connection refused: > org.apache.http.conn.HttpHostConnectException: Connect to processing-3:5000 > [processing-3.demo.onyara.com/172.172.172.172] failed: Connection refused -- This message was sent by Atlassian JIRA (v6.3.15#6346)