UpdateRequest with retryOnConflict using BulkProcessor failed

I am using the Java High Level REST Client, and my UpdateRequest was working fine using the BulkProcessor originally. However, once I add something like "request.retryOnConflict(3);" to my UpdateRequest, and use the same BulkProcessor, I got the following error. Any suggestions?

org.elasticsearch.ElasticsearchStatusException: Elasticsearch exception [type=illegal_argument_exception, reason=Action/metadata line [1] contains an unknown parameter [retry_on_conflict]]
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestR
esponse.java:177) ~[elasticsearch-6.3.0.jar!/:6.3.0]
at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLeve
lClient.java:653) ~[elasticsearch-rest-high-level-client-6.3.0.jar!/:6.3.0]
at org.elasticsearch.client.RestHighLevelClient.parseResponseException(R
estHighLevelClient.java:628) ~[elasticsearch-rest-high-level-client-6.3.0.jar!/:
6.3.0]
at org.elasticsearch.client.RestHighLevelClient$1.onFailure(RestHighLeve
lClient.java:603) [elasticsearch-rest-high-level-client-6.3.0.jar!/:6.3.0]
at org.elasticsearch.client.RestClient$FailureTrackingResponseListener.o
nDefinitiveFailure(RestClient.java:629) [elasticsearch-rest-client-6.3.0.jar!/:6
.3.0]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:385)
[elasticsearch-rest-client-6.3.0.jar!/:6.3.0]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:366)
[elasticsearch-rest-client-6.3.0.jar!/:6.3.0]
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119
) [httpcore-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.resp
onseCompleted(DefaultClientExchangeHandlerImpl.java:177) [httpasyncclient-4.1.2.
jar!/:4.1.2]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse
(HttpAsyncRequestExecutor.java:436) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(Http
AsyncRequestExecutor.java:326) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(De
faultNHttpClientConnection.java:265) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(Inter
nalIODispatch.java:81) [httpasyncclient-4.1.2.jar!/:4.1.2]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(Inter
nalIODispatch.java:39) [httpasyncclient-4.1.2.jar!/:4.1.2]
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(Abstra
ctIODispatch.java:114) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor
.java:162) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(Abstr
actIOReactor.java:337) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(Abst
ractIOReactor.java:315) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIO
Reactor.java:276) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.
java:104) [httpcore-nio-4.4.5.jar!/:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.
run(AbstractMultiworkerIOReactor.java:588) [httpcore-nio-4.4.5.jar!/:4.4.5]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]
Suppressed: org.elasticsearch.client.ResponseException: method [POST], h
ost [http://localhost:9200], URI [/_bulk?timeout=1m], status line [HTTP/1.1 400
Bad Request]
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/me
tadata line [1] contains an unknown parameter [retry_on_conflict]"}],"type":"ill
egal_argument_exception","reason":"Action/metadata line [1] contains an unknown
parameter [retry_on_conflict]"},"status":400}
at org.elasticsearch.client.RestClient$1.completed(RestClient.ja
va:377) [elasticsearch-rest-client-6.3.0.jar!/:6.3.0]
... 16 common frames omitted

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.