org.elasticsearch.action.search.SearchPhaseExecutionException

all shards failed

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1

  • Stack trace

    • org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed at org.elasticsearch.action.search.AbstractSearchAsyncAction.onFirstPhaseResult(AbstractSearchAsyncAction.java:235)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:170)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:51)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:954)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1055)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1033)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportService$6.onFailure(TransportService.java:559)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:490)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_73] at java.lang.Thread.run(Thread.java:745)[?:1.8.0_73] Caused by: org.elasticsearch.transport.RemoteTransportException: [od38nkP][127.0.0.1:9300][indices:data/read/search[phase/query]] Caused by: org.elasticsearch.script.ScriptException: compile error at org.elasticsearch.painless.PainlessScriptEngineService.convertToScriptException(PainlessScriptEngineService.java:264)[?:?] at org.elasticsearch.painless.PainlessScriptEngineService.compile(PainlessScriptEngineService.java:176)[?:?] at org.elasticsearch.script.ScriptService.compileInternal(ScriptService.java:339)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.script.ScriptService.compile(ScriptService.java:235)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.script.ScriptService.search(ScriptService.java:490)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.parseSource(SearchService.java:738)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.createContext(SearchService.java:534)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:501)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:242)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.action.search.SearchTransportService.lambda$registerRequestHandler$667(SearchTransportService.java:276)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportService$6.doRun(TransportService.java:548)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:504)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] Caused by: java.lang.IllegalArgumentException: While loop has no escape. at org.elasticsearch.painless.Executable$Script.compile(while (true) {} @ <inline script>:1) ~[?:?] at org.elasticsearch.painless.node.SWhile.analyze(SWhile.java:74)[?:?] at org.elasticsearch.painless.node.SSource.analyze(SSource.java:190)[?:?] at org.elasticsearch.painless.node.SSource.analyze(SSource.java:162)[?:?] at org.elasticsearch.painless.Compiler.compile(Compiler.java:104)[?:?] at org.elasticsearch.painless.PainlessScriptEngineService$2.run(PainlessScriptEngineService.java:171)[?:?] at org.elasticsearch.painless.PainlessScriptEngineService$2.run(PainlessScriptEngineService.java:168)[?:?] at java.security.AccessController.doPrivileged(Native Method)[?:1.8.0_73] at org.elasticsearch.painless.PainlessScriptEngineService.compile(PainlessScriptEngineService.java:168)[?:?] at org.elasticsearch.script.ScriptService.compileInternal(ScriptService.java:339)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.script.ScriptService.compile(ScriptService.java:235)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.script.ScriptService.search(ScriptService.java:490)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.parseSource(SearchService.java:738)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.createContext(SearchService.java:534)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:501)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:242)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.action.search.SearchTransportService.lambda$registerRequestHandler$667(SearchTransportService.java:276)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.transport.TransportService$6.doRun(TransportService.java:548)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:504)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT] ... 3 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.