无效的NEST响应是由HEAD上的不成功(401)低电平调用建立的

时间:2019-09-16 10:23:54

标签: elasticsearch nest

我正在使用Nest客户端连接到Elasticsearch集群,并且在添加索引记录时遇到了这个问题。

我错过了什么吗?

  • Nest v 7.2.1
  • 弹性版本7.2.1

例外

Failed to create DB Index for Alarm Event.Invalid NEST response built from a unsuccessful (401) low level call on HEAD: /

此API调用的审核记录

[1] BadResponse: Node: http://192.168.0.4:9200/ Exception: PipelineException Took: 00:00:00.0588591
var addresses = new[] {
    new Uri("http://192.168.0.4:9200/"),
    new Uri("http://192.168.0.5:9200/"),
    new Uri("http://192.168.0.6:9200/"),
    new Uri("http://192.168.0.7:9200/"),
};
connectionPool = new StaticConnectionPool(addresses);
connectionSettings = new ConnectionSettings(connectionPool).BasicAuthentication("testuser", "Something_123").DisablePing();
ElasticSearchClient = new ElasticClient(connectionSettings);

var indexes = GetAsxIndexes();
var response = ElasticSearchClient.Ping().DebugInformation;

0 个答案:

没有答案