版本: 7.5-8.9
简而言之,当 Elasticsearch 配置中 HTTP 和 HTTPS 协议的使用不匹配时,就会出现此错误。Elasticsearch 要求集群中所有节点统一使用 HTTP 或 HTTPS 协议。要解决此问题,请确保 Elasticsearch 集群中的所有节点使用相同的协议。如果您使用的是 HTTPS,请确保所有节点都具有正确的 SSL 证书。此外,请检查您的 elasticsearch.yml 配置文件中是否存在协议不一致的情况。
日志上下文 #
日志 “[” + key + “] must use a consistent scheme: http or https” 的类名是 HttpExporter.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考:
httpsHostFound = true;
} // fail if we find them configuring the scheme/protocol in different ways
if (httpHostFound && httpsHostFound) {
throw new SettingsException("[" + key + "] must use a consistent scheme: http or https");
}
}
} @Override





