版本: 7.5-7.5
简要来说,当指定的 Elasticsearch 节点类型与为该节点设置的主机列表之间存在不匹配时,就会发生此错误。这可能是由于配置设置不正确导致的。要解决此问题,你应该验证 Elasticsearch 配置文件(elasticsearch.yml)并确保节点类型和主机列表匹配。如果你使用的是集群,请确保为每个节点正确设置节点类型和主机列表。此外,检查配置文件中是否存在任何语法错误或拼写错误。
日志上下文 #
日志 “host list for [” + key + “] is set but type is [” + type + “]” 的类名是 HttpExporter.java。我们从 Elasticsearch 源代码中提取了以下内容,以便为寻求深入上下文的人提供参考:
} else {
throw new SettingsException("host list for [" + key + "] is empty but type is [" + type + "]");
}
} else if ("http".equals(type) == false) {
// the hosts can only be non-empty if the type is "http"
throw new SettingsException("host list for [" + key + "] is set but type is [" + type + "]");
} boolean httpHostFound = false;
boolean httpsHostFound = false;





