NEST API 调用获取 404 未找到良好查询
NEST API call getting 404 Not Found with good query
我正在使用 NEST 查询 Elastic 5.4 实例并收到以下错误。我拥有所有 DebugInformation(),当 运行 时,Kibana 中 DevTools 中的查询一切正常,我得到了结果。我不认为这是一个超时问题,因为请求似乎已完成并给出响应,但希望能有更多的关注。这是我的 Serilog 输出。这是 运行 使用 ASP.NET 核心的原始查询。预先感谢您的帮助。
2017-08-24 10:48:58.723 -05:00 [Debug] ElasticController:Index
2017-08-24 10:48:58.921 -05:00 [Debug] ElasticService.QueryInstanceTail: elasticQuery { "bool": { "filter": [ { "term": { "instance_num": "99999999" }}, { "range": { "@timestamp": { "gte": "2017-08-22T15:48:00Z", "lte": "2017-08-22T16:48:00Z" } } } ] } }
2017-08-24 10:48:58.922 -05:00 [Debug] ElasticService.QueryInstanceTail: searchResponse 0 : Invalid NEST response built from a unsuccessful low level call on POST: /filebeat-%2A/_search
# Audit trail of this API call:
- [1] BadResponse: Node: http://devserver.local:5601/ Took: 00:00:00.1976977
# ServerError: ServerError: -1Type: Reason: "Not Found"
# Request:
{"from":0,"size":60,"query":{ "bool": { "filter": [ { "term": { "instance_num": "99999999" }}, { "range": { "@timestamp": { "gte": "2017-08-22T15:48:00Z", "lte": "2017-08-22T16:48:00Z" } } } ] } }
# Response:
{"statusCode":404,"error":"Not Found"}
我犯了一个简单的傻瓜错误。我在 API 连接字符串中有 Kibana 端口。然而,NEST 给出的 return 在我看来是成功的,但弹性 returned 了 404。这只是给将来可能会发生这种情况的任何人的注意事项。确保您的连接字符串。
我正在使用 NEST 查询 Elastic 5.4 实例并收到以下错误。我拥有所有 DebugInformation(),当 运行 时,Kibana 中 DevTools 中的查询一切正常,我得到了结果。我不认为这是一个超时问题,因为请求似乎已完成并给出响应,但希望能有更多的关注。这是我的 Serilog 输出。这是 运行 使用 ASP.NET 核心的原始查询。预先感谢您的帮助。
2017-08-24 10:48:58.723 -05:00 [Debug] ElasticController:Index
2017-08-24 10:48:58.921 -05:00 [Debug] ElasticService.QueryInstanceTail: elasticQuery { "bool": { "filter": [ { "term": { "instance_num": "99999999" }}, { "range": { "@timestamp": { "gte": "2017-08-22T15:48:00Z", "lte": "2017-08-22T16:48:00Z" } } } ] } }
2017-08-24 10:48:58.922 -05:00 [Debug] ElasticService.QueryInstanceTail: searchResponse 0 : Invalid NEST response built from a unsuccessful low level call on POST: /filebeat-%2A/_search
# Audit trail of this API call:
- [1] BadResponse: Node: http://devserver.local:5601/ Took: 00:00:00.1976977
# ServerError: ServerError: -1Type: Reason: "Not Found"
# Request:
{"from":0,"size":60,"query":{ "bool": { "filter": [ { "term": { "instance_num": "99999999" }}, { "range": { "@timestamp": { "gte": "2017-08-22T15:48:00Z", "lte": "2017-08-22T16:48:00Z" } } } ] } }
# Response:
{"statusCode":404,"error":"Not Found"}
我犯了一个简单的傻瓜错误。我在 API 连接字符串中有 Kibana 端口。然而,NEST 给出的 return 在我看来是成功的,但弹性 returned 了 404。这只是给将来可能会发生这种情况的任何人的注意事项。确保您的连接字符串。