Search code examples
configurationsonarqube

"Fail to execute ES search request" popup alert in SonarQube web UI after upgrading from 4.5.1 to 5.1


when I click on an issue in SonarQube web UI to see details, I get this red popup:

Fail to execute ES search request '{"size":1000,"query":{"bool":{"must":[{"term":{"fileUuid":"9c1ae181-f5c3-47da-8fad-3716aca54b6d"}},{"range":{"line":{"from":1,"to":1000,"include_lower":true,"include_upper":true}}}]}},"sort":[{"line":{"order":"asc"}}]}' on indices '[sourcelines]' on types '[sourceline]'

and the source code or issue details are not shown. we started getting this after upgrading from Sonar 4.5.1 to 5.1

I stopped the sonar server, deleted SONAR_QUBE/data/es folder, restarted the process and I see these messages in log:

es[o.e.c.r.a.decider] [sonar-1431655214631] low disk watermark [15%] exceeded on [1rprlr2pTS2zotdYv71GkQ][sonar-1431655214631] free: 534.3mb[13.2%], replicas will not be assigned to this node

I suppose this may be related, but not sure if these "replicas" have anything to do with "indices"...


Solution

  • I solved this by rebuilding Elastic Search indices:

    1. Stop your SonarQube server
    2. Remove the contents of the $SQ_HOME/data/es directory
    3. Start the server

    SonarQube will recreate indices on startup.