📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-7.15

简单来说,当Elasticsearch由于存在多个绑定地址而无法自动确定发布端口时,就会出现此错误。这种情况通常发生在节点被配置为绑定到多个网络接口时。要解决这个问题,您可以在Elasticsearch配置文件(elasticsearch.yml)中使用’network.host’设置指定单个网络接口。或者,您可以根据您的设置显式设置’http.publish_port’或’transport.publish_port'。这将帮助Elasticsearch识别正确的发布端口。

日志上下文 #

日志"Failed to auto-resolve publish port" + profileExplanation + “; multiple bound addresses “的类名是 TcpTransport.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的用户参考:

}
 }  if (publishPort < 0) {
 String profileExplanation = profileSettings.isDefaultProfile ? "" : " for profile " + profileSettings.profileName;
 throw new BindTransportException("Failed to auto-resolve publish port" + profileExplanation + "; multiple bound addresses " +
 boundAddresses + " with distinct ports and none of them matched the publish address (" + publishInetAddress + "). " +
 "Please specify a unique port by setting " + TransportSettings.PORT.getKey() + " or " +
 TransportSettings.PUBLISH_PORT.getKey());
 }
 return publishPort;