Elastic.Clients.Elasticsearch version:8.15.1
Elasticsearch version:8.11.4/8.15.1
.NET runtime version:8.0
Operating system version:ubuntu 22
Description of the problem including expected versus actual behavior:
A clear and concise description of what the bug is.
Steps to reproduce:
ERROR:
The client noticed that the server is not a supported distribution of Elasticsearch or an unknown product.
config:
services.AddSingleton(sp =>
{
var settings = sp.GetRequiredService<IOptions>().Value;
var connectionSettings = new ElasticsearchClientSettings(new Uri("http://elasticsearch:9200"))
.EnableDebugMode() // 仅在开发环境启用
//.DisableDirectStreaming()
//.EnableHttpCompression(true)
//.PrettyJson()
.RequestTimeout(TimeSpan.FromMinutes(2))
.MaximumRetries(3)
.OnRequestCompleted(details =>
{
// 详细的请求完成回调
});
return new ElasticsearchClient(connectionSettings);
});