aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-search
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-12-30 20:44:23 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-12-30 21:03:22 +0100
commit42785ab206ff561da7e9d5b6ac6e23ccd589124a (patch)
treefe7500999d08b31d98b3b202006ea3406eeddb1e /server/sonar-search
parent8e4c0d557d1c3e29eceba28c64eec0327b7812dc (diff)
downloadsonarqube-42785ab206ff561da7e9d5b6ac6e23ccd589124a.tar.gz
sonarqube-42785ab206ff561da7e9d5b6ac6e23ccd589124a.zip
Improve stability of randomly allocated ports (when sonar.web.port or sonar.search.port are set to zero)
Diffstat (limited to 'server/sonar-search')
-rw-r--r--server/sonar-search/src/main/java/org/sonar/search/SearchSettings.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchSettings.java b/server/sonar-search/src/main/java/org/sonar/search/SearchSettings.java
index ede9e33358c..fe781338179 100644
--- a/server/sonar-search/src/main/java/org/sonar/search/SearchSettings.java
+++ b/server/sonar-search/src/main/java/org/sonar/search/SearchSettings.java
@@ -130,6 +130,8 @@ class SearchSettings {
// disable multicast
builder.put("discovery.zen.ping.multicast.enabled", "false");
builder.put("transport.tcp.port", tcpPort);
+ // Elasticsearch sets the default value of TCP reuse address to true only on non-MSWindows machines, but why ?
+ builder.put("network.tcp.reuse_address", true);
Integer httpPort = props.valueAsInt(PROP_HTTP_PORT);
if (httpPort == null) {