ElasticsearchStatusException Solution?

Hi, I’m using File System crawler and get some failure URL with log:
ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177)
at org.codelibs.elasticsearch.client.action.HttpAction.toElasticsearchException(HttpAction.java:138)
at org.codelibs.elasticsearch.client.action.HttpSearchAction.lambda$execute$0(HttpSearchAction.java:48)
at org.codelibs.curl.CurlRequest.lambda$execute$4(CurlRequest.java:220)
at org.codelibs.curl.CurlRequest.lambda$connect$3(CurlRequest.java:199)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Suppressed: ElasticsearchException[hits is null.]
… 9 more
Suppressed: org.codelibs.elasticsearch.client.action.HttpAction$CurlResponseException: {“error”:{“root_cause”:[],“type”:“search_phase_execution_exception”,“reason”:“all shards failed”,“phase”:“query”,“grouped”:true,“failed_shards”:[]},“status”:503}

How can I fix this?
Thanks

Did you check a log file in elasticsearch?
I seems that elasticsearch returned 503 error.

I use builtin ES. I dont know if they have ES log separate

Sometimes an exception may occur if using builtin elasticsearch.
As described in Installation guide, embedded elasticsearch is not recommended for production use.

1 Like

Some time I got the “org.codelibs.fess.crawler.exception.MaxLengthExceededException” althought set the maxlenght to 300MB. Is it relate to builtin ES?

Maybe yes.
A standalone elasticsearch is recommended.