MacBook Pro 16 M1Pro JetBrains 骑士 2023.3.3 项目:net6.0 c#10 使用 Nest 客户端版本:7.13.2 远程弹性版本:“版本”:{“7.17.8”}
从 POST 上不成功的 (400) 低级别调用构建的无效 NEST 响应:/{someIndex}/_search?typed_keys=true 此 API 调用的审核跟踪: - [1] BadResponse: Node: http://{someService}.loc:9200/ Take: 00:00:00.4839970 OriginalException:Elasticsearch.Net.ElasticsearchClientException:请求执行失败。调用:状态代码 400 来自:POST /{someIndex}/_search?typed_keys=true。 ServerError:类型:原因:“找不到 uri [http://{someService}.loc:9200/{someIndex}/_search?typed_keys=true] 和方法 [POST] 的处理程序” 请求: {"query":{"term":{"someParam":{"value":"someId"}}}} 回应: {“error”:“找不到 uri [http://{someService}:9200/{someIndex}/_search?typed_keys=true] 和方法 [POST] 的处理程序”}
从 POST 上不成功的 () 低级调用构建的无效 NEST 响应:/{someIndex}/_search?typed_keys=true 此 API 调用的审计跟踪:
1.Ping(IRequestPipeline pipeline, Node node) at Elasticsearch.Net.Transport
1.Request[TResponse](HttpMethod方法,字符串路径,PostData数据,IRequestParameters requestParameters)
--- 内部异常堆栈跟踪结束 ---
请求:
但是如果我在终端中卷曲 {elasticUrlIndex} - 数据会返回。
我已经尝试更改版本。在 7.14.0(和最新版本)上,最新版本出现一种类型的错误 - 不同的错误。
我用
DisableAutomaticProxyDetection()
解决了这个问题
使用示例:
var connectionPool = new SingleNodeConnectionPool(new Uri("someUrl"));
var connSettings = new ConnectionSettings(connectionPool)
.DisableDirectStreaming()
.DisableAutomaticProxyDetection();
var elasticClient = new ElasticClient(connSettings);