@@ -145,7 +145,7 @@ public class CommandFactoryImpl implements CommandFactory { | |||
.setEsYmlSettings(new EsYmlSettings(settingsMap)) | |||
.setClusterName(settingsMap.get("cluster.name")) | |||
.setHost(settingsMap.get("network.host")) | |||
.setPort(Integer.parseInt(settingsMap.get("transport.tcp.port"))); | |||
.setPort(Integer.parseInt(settingsMap.get("transport.port"))); | |||
return esInstallation; | |||
} | |||
@@ -91,7 +91,9 @@ public class EsSettings { | |||
int port = Integer.parseInt(props.nonNullValue(SEARCH_PORT.getKey())); | |||
LOGGER.info("Elasticsearch listening on {}:{}", host, port); | |||
builder.put("transport.tcp.port", valueOf(port)); | |||
// FIXME no need to open TCP port unless running DCE | |||
// TCP is used by main process to check ES is up => probably has to use HTTP now | |||
builder.put("transport.port", valueOf(port)); | |||
builder.put("transport.host", valueOf(host.getHostAddress())); | |||
builder.put("network.host", valueOf(host.getHostAddress())); | |||
@@ -138,7 +138,7 @@ public class EsSettingsTest { | |||
EsSettings esSettings = new EsSettings(props, new EsInstallation(props), system); | |||
Map<String, String> generated = esSettings.build(); | |||
assertThat(generated.get("transport.tcp.port")).isEqualTo("1234"); | |||
assertThat(generated.get("transport.port")).isEqualTo("1234"); | |||
assertThat(generated.get("transport.host")).isEqualTo("127.0.0.1"); | |||
// no cluster, but cluster and node names are set though |