I was able to index documents in bulk before I installed xpack. After installing xpack, I am getting failure in bulk execution:
. I am using java client for xpack
<dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>x-pack-transport</artifactId> <version>5.5.1</version> </dependency>
and connecting to ES server via
client = new PreBuiltXPackTransportClient(Settings.builder()
.put("cluster.name", "name")
.put("xpack.security.user", "user:pass")
.build())
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("ip"), 9300));
and bulk indexing
try {
BulkResponse r = bulkRequest.get();
System.out.println(r.buildFailureMessage()); // printsfailure in bulk execution:
for(BulkItemResponse a : r.getItems()){
System.out.println("failure message : "+a.getFailureMessage());
System.out.println("response : "+a.getResponse());
System.out.println("failure : "+a.getFailure());
}
new ConfigureES().client.close();
} catch (Exception we) {
we.printStackTrace();
}
gives me limited information
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIK,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIL,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIM,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIN,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIO,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIP,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIQ,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIR,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIS,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIT,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIU,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIV,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIW,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIX,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIY,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIZ,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIa,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIb,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIc,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQId,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIe,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIf,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIg,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response : IndexResponse[index=bigmart_bill_store_id,type=bill_store_id,id=AWCWDBZKNaFB56dBfQIi,version=1,result=created,shards={"total":2,"successful":1,"failed":0}]
failure : null
failure message : null
response :
closing client
what could be the cause of this error ?