版本: 6.8-7.15
简而言之,当Elasticsearch由于多个绑定地址而无法自动确定HTTP发布端口时,就会出现此错误。当节点配置为绑定到多个网络接口时,可能会发生这种情况。要解决此问题,您可以在Elasticsearch配置文件(elasticsearch.yml)中使用’network.host’设置指定单个网络接口。或者,您可以在配置文件中显式设置’http.publish_port’设置来定义HTTP发布端口。
日志上下文 #
日志"Failed to auto-resolve http publish port; multiple bound addresses"类名是 AbstractHttpServerTransport.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入了解上下文的人使用:
publishPort = ports.iterator().next().value;
}
} if (publishPort < 0) {
throw new BindHttpException("Failed to auto-resolve http publish port; multiple bound addresses " + boundAddresses +
" with distinct ports and none of them matched the publish address (" + publishInetAddress + "). " +
"Please specify a unique port by setting " + SETTING_HTTP_PORT.getKey() + " or " + SETTING_HTTP_PUBLISH_PORT.getKey());
}
return publishPort;
}





