版本: 6.8-8.9
简而言之,当 Elasticsearch 配置使用代理时,但代理设置中缺少’端口’和’主机’字段,就会发生此错误。Elasticsearch 需要这些字段来知道将流量路由到何处。要解决此问题,您应该检查 Elasticsearch 配置,并确保代理设置同时包含’端口’和’主机’字段。如果这些字段缺失,请添加适当的值。此外,确保语法正确且没有拼写错误。
日志上下文
日志"Proxy must contain ‘port’ and ‘host’ field"(代理必须包含’端口’和’主机’字段)的类名是 HttpProxy.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
}
}
} if (port == null || host == null) {
throw new ElasticsearchParseException("Proxy must contain 'port' and 'host' field");
} return new HttpProxy(host; port; scheme);
}
}





