# org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed in Spring Boot

**URL:** <https://discuss.elastic.co/t/org-elasticsearch-action-search-searchphaseexecutionexception-all-shards-failed-in-spring-boot/230544>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [April 30, 2020, 12:19pm UTC](https://discuss.elastic.co/t/org-elasticsearch-action-search-searchphaseexecutionexception-all-shards-failed-in-spring-boot/230544 "2020-04-30T12:19:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhwanil\_Patel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhwanil_patel/32/48390_2.png) [@Dhwanil\_Patel](https://discuss.elastic.co/u/Dhwanil_Patel)\
**Post date:** [April 30, 2020, 12:19pm UTC](https://discuss.elastic.co/t/org-elasticsearch-action-search-searchphaseexecutionexception-all-shards-failed-in-spring-boot/230544/1 "2020-04-30T12:19:58Z")

</div>

First of all sorry if i missed something.  
Actually i'm new in elasticsearch.  
Now comes to the point, I'm working on spring boot project built via jhipster.  
In which, I specify index name "Document" with following configuration

```
@Document(indexName = "document", shards = 1, replicas = 0)

```

It's working on start but after insert 10-15 data i got the above error. This issue occur lot many time. I'm not able to find out where is the problem or if it's related to size then how to increse size of shard or segment.

Following are snep of error which i got,

In Spring Boot,

> 020-04-30 16:18:27.458 ERROR 15124 --- [XNIO-1 task-19] c.g.v.s.jest.mapper.DefaultErrorMapper : Cannot execute jest action , response code : 503 , error : {"root\_cause":,"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":} , message : null

> java.io.IOException: The server sockets created using the LocalRMIServerSocketFactory only accept connections from clients running on the host where the RMI remote objects have been exported.  
> at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114)  
> at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394)  
> at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366)  
> at java.base/java.lang.Thread.run(Thread.java:834)

In Docker log,

> [document][0] failed engine [translog trimming failed]  
> java.nio.file.NoSuchFileException: /usr/share/elasticsearch/data/nodes/0/indices/uThDERJkSBqSv4dFGMJDMQ/0/translog/translog-12.tlog

Translog file is not that location. Why this error occur after this many record inserted.

Docker Image File :

Elasticsearch.yml

> version: '2.2'  
> services:  
> docy-elasticsearch:  
> image: [docker.elastic.co/elasticsearch/elasticsearch:6.8.6](http://docker.elastic.co/elasticsearch/elasticsearch:6.8.6)  
> container\_name: docy-elasticsearch  
> volumes:  
> - ../../../../docy\_config/ELK\_Data/data/:/usr/share/elasticsearch/data/  
> ports:  
> - 9200:9200  
> - 9300:9300  
> restart: always  
> environment:  
> - cluster.name=docker-cluster  
> - xpack.security.enabled=false  
> - bootstrap.memory\_lock=false  
> - ES\_JAVA\_OPTS=-Xms1024m -Xmx1024m  
> - discovery.type=single-node  
> - xpack.monitoring.enabled=false  
> - xpack.monitoring.collection.enabled=false  
> - xpack.monitoring.elasticsearch.collection.enabled=false  
> - xpack.ml.enabled=true  
> - xpack.graph.enabled=true  
> - xpack.watcher.enabled=true  
> - number\_of\_replicas=0  
> - xpack.monitoring.collection.indices=document, user  
> - SPRING\_DATA\_JEST\_URI=[http://docy-elasticsearch:9200/](http://docy-elasticsearch:9200/)

Kibana.yml

> version: '2'  
> services:  
> docy-kibana:  
> image: [docker.elastic.co/kibana/kibana:6.8.6](http://docker.elastic.co/kibana/kibana:6.8.6)  
> container\_name: docy-kibana  
> ports:  
> - 5601:5601  
> restart: always  
> environment:  
> - ELASTICSEARCH\_URL=[http://docy-elasticsearch:9200/](http://docy-elasticsearch:9200/)  
> - xpack.monitoring.enabled=true  
> - xpack.monitoring.ui.container.elasticsearch.enabled=true  
> - xpack.monitoring.collection.enabled=true

Can someone please guide me?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 28, 2020, 12:20pm UTC](https://discuss.elastic.co/t/org-elasticsearch-action-search-searchphaseexecutionexception-all-shards-failed-in-spring-boot/230544/2 "2020-05-28T12:20:05Z")

</div>

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