[
https://issues.apache.org/jira/browse/NIFI-4410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16177842#comment-16177842
]
Matt Burgess commented on NIFI-4410:
------------------------------------
The Elasticsearch API is a bit inconsistent when it comes to certain errors.
For example, if you try to update a nonexistent record, you get a 404 Not Found
status code, and an error reason in the response. However if you try to delete
a document that does not exist, it reports a 404 Not Found status code, but
does not provide an error (instead, it marks it as "successful" in the shards
field but sets a "result" field to "not_found"). This is currently the only
condition I can see where you'd get an error code without an error reason.
Under this Jira we should include penalizing failed flow files, as well as
collecting the "result" field value if it exists, and the "error/reason" field
if it does not. We may also check to see if all requests failed, as this might
indicate a system-wide issue (failure, misconfiguration, e.g.) and may need to
be handled differently. We should also consider a "not found" relationship,
although this would change the existing behavior as we try to normalize the
"not-found vs other error" behavior to be more consistent with other NiFi
processors.
> PutElasticsearchHttp needs better error handling and logging
> ------------------------------------------------------------
>
> Key: NIFI-4410
> URL: https://issues.apache.org/jira/browse/NIFI-4410
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Joseph Witt
> Assignee: Matt Burgess
>
> https://github.com/apache/nifi/blob/6b5015e39b4233cf230151fb45bebcb21df03730/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java#L364-L366
> If it cannot extract the reason text it provides a very generic error and
> there is nothing else logged. You get no context as to what went wrong and
> further the condition doesn't cause yielding or anything so there is just a
> massive flood of errors in logs that dont' advise the user of the problem.
> We need to make sure the information can be made available to help
> troubleshoot and we need to cause yielding so that such cases do not cause
> continuous floods of errors.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)