SonarQube: Change Elastic Search Client Host
In short: is there a way to change the target address in the elastic search client used by SonarQube?
Additional info: I'd love to use SonarQube> 4.1 on OpenShift. Unfortunately, you cannot bind to localhost in this environment. So, these guys changed the service wrapper to channel transfer mode and used the property sonar.web.host
to configure SonarQube 4.0. Starting with SonarQube 4.1 , we will also have an elastic search engine that tries to bind to localhost, which crashes on startup. But isn't there such a thing as a property sonar.search.host
(similar to sonar.search.port
), is there?
As a workaround, changing the server binding can be changed using the sonar.search.javaAdditionalOpts
and parameters es.network.host
. Yes, I know, I shouldn't do this . Because now the application crashes with . This is why I am looking for a way to change this.
Looking at the source code of SonarQubes , I am assuming the client's target address is hardcoded. (I may have been wrong)NoNodeAvailableException
: No node available
My guess is that without a solution for this, we will never run SonarQube 5.0 on OpenShift or any other environment with strict security policy.
Can anyone think of another workaround?
Maybe changing the Java definition for the "localhost" / loopback interface? However, the change /etc/hosts
doesn't work without root access. Any other ideas?
Edit . If you want to take a look at here as far as I've got so far . the assembly file is an important part.
source to share
This is possible since SonarQube 5.2 using thesonar.search.host
.
For an example of using this method in OpenShift see here .
source to share