Elastic Search exception: Failed to execute ES search request

2,132 views
Skip to first unread message

charl...@gmail.com

unread,
Jun 22, 2016, 2:32:17 PM6/22/16
to SonarQube
Hi,

While browsing the custom dashboard for a specific project, I get an exception from Elastic Search, like so:
"Fail to execute ES search request"



I tried stopping my server, deleting <SQ_HOME>/data/es/* and start my server, but the error won't go away.

Is it fixed in SonarQube 5.6?

Thank you

Charles

Auto Generated Inline Image 1

mor...@gmail.com

unread,
Aug 1, 2016, 11:22:59 AM8/1/16
to SonarQube
did you ever get a response and resolution as we are also encountering the same error !!

Charles Morin

unread,
Aug 1, 2016, 4:49:37 PM8/1/16
to mor...@gmail.com, SonarQube

No I didn't, unfortunately.

Let me know if you find a fix!

Thanks


--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/Qz7g04Ws1GE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/cdf708e0-8efd-4170-979f-97bf590ba625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

saif...@gmail.com

unread,
Aug 15, 2016, 4:18:19 PM8/15/16
to SonarQube
We are also seeing the exact error as described above.
Version = 5.6.
I also tried Deleting the content of the $SONARQUBE_HOME/data/es folder and restarting your SonarQube server, but still the same error.

Did anyone have any resolution yet?

Simon Brandhof

unread,
Aug 22, 2016, 9:52:11 AM8/22/16
to saif...@gmail.com, SonarQube, John Morales, charl...@gmail.com
Hi guys,

Could you please try to upgrade to version 6.0 ? The error exactly mentioned in the initial email should have been fixed (extended_bounds.min with negative value).

Thanks

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/1b6ea628-b821-4b83-a284-083b09728501%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

Charles Morin

unread,
Aug 22, 2016, 12:28:53 PM8/22/16
to SonarQube, saif...@gmail.com, mor...@gmail.com, charl...@gmail.com
Hey Simon,

Is there anything I can modify in 5.6 without having to upgrade? The reason why I am asking this is that I work for a large company where all assets must go through a long certification process. We use 5.6 and would like to stick with it.

Thank you.

Charles

Simon Brandhof

unread,
Aug 22, 2016, 1:07:25 PM8/22/16
to Charles Morin, SonarQube, saif...@gmail.com, mor...@gmail.com
In fact I can't reproduce the issue in 5.6. The fix I was talking about in 6.0 is something else. 
Here are a few questions to better understand the context:
  • What is the custom dashboard you're talking about ? Which widgets are defined in it ? Or are you talking about the project page named "Issues" ?
  • how many issues have this project ? (it's the sum of bugs, vulnerabilities and code smells)
  • what is the timezone (see Administration -> System -> System Info -> user.timezone) ?
  • did you override the properties sonar.search.javaOpts and sonar.search.javaAdditionalOpts ? If yes, with which values ?
  • what is the version of JDK ?
Thanks


For more options, visit https://groups.google.com/d/optout.

Simon Brandhof

unread,
Aug 22, 2016, 3:59:49 PM8/22/16
to Charles Morin, SonarQube
Thanks Charles for the information. I'm forwarding your email to the group.

To answer your last question, JRE is ok but it's highly recommended to install a more recent version. Moreover upgrading to the Long Term Support version of SonarQube would also be a good move (5.6.1 at that time).

Regards.


On Mon, 22 Aug 2016 at 20:55 Charles Morin <charl...@gmail.com> wrote:
For unknown reasons I can't reproduce the issue anymore. It seems to be gone for good... but anyway, here are my answers to your question.


What is the custom dashboard you're talking about ? Which widgets are defined in it ? Or are you talking about the project page named "Issues" ?

From the frontpage, I click on a project, then on Dashboards > Custom

How many issues have this project ? (it's the sum of bugs, vulnerabilities and code smells)
The worst project we have had around 3000. Now the number is a lot less than that.

What is the timezone (see Administration -> System -> System Info -> user.timezone) ?

America/New_York

Did you override the properties sonar.search.javaOpts and sonar.search.javaAdditionalOpts ? If yes, with which values
Nope. All I have changed is the wrapper.java.command to point to the right JRE, like so:
wrapper.java.command=D:/APPS/sonarqube-5.5/jre1.8.0_45/bin/java

What is the version of JDK ?
The wrapper uses a JRE, not a JDK. Version is jre1.8.0_45. Do I absolutely need to use a JDK?

Thank you

Naveen Srinivasan

unread,
Sep 14, 2016, 3:16:58 PM9/14/16
to SonarQube
We are also running into the same issue. What we do?

Here is the call-stack

2016.09.14 17:59:18 ERROR web[o.s.s.w.WebServiceEngine] Fail to process request http://localhost/api/issues/search?componentRoots=core&pageIndex=21&pageSize=-1&resolved=false
java.lang.IllegalStateException: Fail to execute ES search request '{"from":10000,"size":500,"query":{"bool":{"must":{"match_all":{}},"filter":{"bool":{"must":[{"bool":{"must_not":{"exists":{"field":"resolution"}}}},{"terms":{"project":["AVWactTp5T8J3rHLmKpo"]}},{"has_parent":{"query":{"bool":{"must":{"match_all":{}},"filter":{"bool":{"should":[{"term":{"users":"jenkins"}},{"term":{"groups":"Anyone"}},{"term":{"groups":"sonar-users"}},{"term":{"groups":"sonar-administrators"}}]}}}},"parent_type":"authorization"}}]}}}},"sort":[{"issueUpdatedAt":{"order":"desc","missing":"_first"}},{"key":{"order":"asc","missing":"_first"}}]}' on indices '[issues]' on types '[issue]'
at org.sonar.server.es.request.ProxySearchRequestBuilder.get(ProxySearchRequestBuilder.java:48) ~[sonar-server-6.0.jar:na]
at org.sonar.server.es.request.ProxySearchRequestBuilder.get(ProxySearchRequestBuilder.java:36) ~[sonar-server-6.0.jar:na]
at org.sonar.server.issue.index.IssueIndex.search(IssueIndex.java:237) ~[sonar-server-6.0.jar:na]
at org.sonar.server.issue.ws.SearchAction.doHandle(SearchAction.java:301) ~[sonar-server-6.0.jar:na]
at org.sonar.server.issue.ws.SearchAction.handle(SearchAction.java:288) ~[sonar-server-6.0.jar:na]
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:109) ~[sonar-server-6.0.jar:na]
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:74) [sonar-server-6.0.jar:na]
at org.sonar.server.platform.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:125) [sonar-server-6.0.jar:na]
at org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:94) [sonar-server-6.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:56) [sonar-server-6.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.sonar.server.platform.RoutesFilter.doFilter(RoutesFilter.java:55) [sonar-server-6.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:84) [sonar-server-6.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.32.jar:8.0.32]
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:191) [logback-access-1.1.3.jar:na]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-embed-core-8.0.32.jar:8.0.32]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.32.jar:8.0.32]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onFirstPhaseResult(AbstractSearchAsyncAction.java:206) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:152) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:46) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:855) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:833) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:387) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
... 1 common frames omitted


On Wednesday, June 22, 2016 at 2:32:17 PM UTC-4, Charles Morin wrote:

Simon Brandhof

unread,
Sep 14, 2016, 3:24:08 PM9/14/16
to Naveen Srinivasan, SonarQube
Hi Naveen,

It's quite hard to answer you without more information. Please have a look at my previous email in this thread. I asked some questions that nobody answered. Basically can you share the JSON export of your "System Info" (see Administration -> System -> System Info -> Download) ?

Thanks
Simon

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Naveen

unread,
Sep 14, 2016, 3:49:13 PM9/14/16
to Simon Brandhof, SonarQube

Simon Brandhof

unread,
Sep 15, 2016, 4:35:11 AM9/15/16
to Naveen, SonarQube
Naveen,

According to your system status, the error does not relate to Elasticsearch lack of system resources (CPU/memory). To help investigating further, can you send the exact error message that was displayed ? Do you have WARN or ERROR logs in sonar.log ?

Thanks

Naveen

unread,
Sep 15, 2016, 7:42:06 AM9/15/16
to Simon Brandhof, SonarQube

Simon Brandhof

unread,
Sep 15, 2016, 8:28:47 AM9/15/16
to Naveen, SonarQube
The failing HTTP requests in the logs do not relate to issues page nor default dashboard. Do you know which page or system sends them ? They aim to browse all the open issues of a specified project.
The problem is that the web service api/issues/search fails to return more than 10'000 issues. In your case the 21th page of 500 issues is requested.

The first improvement to be done on our side is to not crash but quietly return a 400 bad request when too many issues are requested. Then I wonder how we can implement loading of such page. The way the backend has been designed does not allow that. To be sure it's worth it, can you describe the need for extracting so many issues on a single project ?

Thanks

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Naveen

unread,
Sep 15, 2016, 9:02:13 AM9/15/16
to Simon Brandhof, SonarQube
We are trying to use sonarqube client from intellij which is causing this failure.

Simon Brandhof

unread,
Sep 15, 2016, 9:22:11 AM9/15/16
to Naveen, SonarQube
Is it SonarLint for Intellij ?

Simon Brandhof

unread,
Sep 16, 2016, 5:39:46 PM9/16/16
to Naveen, SonarQube
FYI, as discussed offline, the problem does not relate to SonarLint but to https://github.com/sonar-intellij-plugin/sonar-intellij-plugin. You should contact the maintainers of this project (or give a try to SonarLint :-) ). 


On Thu, 15 Sep 2016 at 15:21 Simon Brandhof <simon.b...@sonarsource.com> wrote:
Is it SonarLint for Intellij ?

On Thu, 15 Sep 2016 at 15:02 Naveen <nsriniv...@gmail.com> wrote:
We are trying to use sonarqube client from intellij which is causing this failure.

Naveen

unread,
Sep 16, 2016, 6:23:39 PM9/16/16
to Simon Brandhof, SonarQube
Will do, thanks!

chris....@gmail.com

unread,
Nov 16, 2016, 10:26:15 AM11/16/16
to SonarQube
I am getting a similar issue, but I have noticed that it is due to the fact that our authors in our subversion have the domain name prefixing them, and the backslash causes a problem for the pattern matcher.
So the autors in our svn commits are in the format:-
<domainName>\<userName>

It gives the following error in the logs:-
.......PatternSyntaxException[Illegal/unsupported escape sequence near index 11
.....
TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:237) ~[elasticsearch-1.7.5.jar:na]

Has this been fixed in version 6?

Simon Brandhof

unread,
Nov 16, 2016, 10:35:36 AM11/16/16
to chris....@gmail.com, SonarQube
Hi Chris,

As this is not the same issue, could you please open a new thread ?

Thanks

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Message has been deleted
Message has been deleted

wissem....@gmail.com

unread,
Feb 15, 2018, 11:18:28 AM2/15/18
to SonarQube
Hi,
I'm using sonarQube 6.7.1 and I'm getting the same error

Teryk Bellahsene

unread,
Mar 9, 2018, 10:34:30 AM3/9/18
to wissem....@gmail.com, SonarQube
Hello,

How are you exploring a custom project dashboard in 6.7.1? I don't understand.

Sincerely,

Teryk Bellahsene | SonarSource
Software Developer
http://sonarsource.com

On 15 February 2018 at 17:18, <wissem....@gmail.com> wrote:
Hi,
I'm using sonarQube 6.7.1 and I'm getting the same error

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/58d64c77-02f5-46a7-a8e2-8f204c1a06e4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages