From 54832bc3e3adf9bd43cfd51e0f88097bc7502120 Mon Sep 17 00:00:00 2001 From: Tarun Samanta Date: Wed, 21 Jun 2023 21:32:48 +0530 Subject: [PATCH] fix(bug): Extension should not bind to its hostname (#830) Signed-off-by: Tarun Samanta --- src/main/java/org/opensearch/sdk/ExtensionsRunner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java index 8f73e799..016ccd9a 100644 --- a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java +++ b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java @@ -159,7 +159,8 @@ protected ExtensionsRunner(Extension extension) throws IOException { ExtensionSettings extensionSettings = extension.getExtensionSettings(); Settings.Builder settingsBuilder = Settings.builder() .put(NODE_NAME_SETTING, extensionSettings.getExtensionName()) - .put(TransportSettings.BIND_HOST.getKey(), extensionSettings.getHostAddress()) + .put(TransportSettings.PUBLISH_HOST.getKey(), extensionSettings.getHostAddress()) + .putList(TransportSettings.BIND_HOST.getKey(), Collections.emptyList()) .put(TransportSettings.PORT.getKey(), extensionSettings.getHostPort()); boolean sslEnabled = extensionSettings.getSecuritySettings().containsKey(SSL_TRANSPORT_ENABLED) && "true".equals(extensionSettings.getSecuritySettings().get(SSL_TRANSPORT_ENABLED));