expected:'"', actual:' ', at offset:61: UnexpectedElasticsearchClientException
See original GitHub issueNEST/Elasticsearch.Net version: 7.6.1
Elasticsearch version: 7.1
Description of the problem including expected versus actual behavior: Getting UnexpectedElasticsearchClientException on sequantial requests match_all rests.
expected:‘"’, actual:’
', at offset:61: UnexpectedElasticsearchClientException
at Elasticsearch.Net.Transport1.RequestAsync[TResponse](HttpMethod method, String path, CancellationToken cancellationToken, PostData data, IRequestParameters requestParameters) at Nest.ElasticClient.SearchAsync[TDocument](ISearchRequest request, CancellationToken ct) at Nest.ElasticClient.SearchAsync[TDocument](Func
2 selector, CancellationToken ct)
at GlobalSearch.Infrastructure.Helpers.DefaultNestSearchExecutor.Search[T](ValueTuple`8 searchParams) in C:_agents\r\r001_work\7\s\src\globalsearch\Infrastructure\Helpers\DefaultNestSearchExecutor.cs:line 49
at GlobalSearch.Services.SearchProcessor.SearchObjectDetails(SearchRequestDto request) in C:_agents\r\r001_work\7\s\src\globalsearch\Services\SearchProcessor.cs:line 46
at GlobalSearch.Handlers.SearchProxyHandler(SearchRequestDto request, ILambdaContext context) in C:_agents\r\r001_work\7\s\src\globalsearch\Handlers.cs:line 26
at lambda_method(Closure , Stream , Stream , LambdaContextInternal )
at Elasticsearch.Net.Utf8Json.JsonReader.ReadStringSegmentRaw()
at Deserialize(Object[] , JsonReader& , IJsonFormatterResolver )
at Elasticsearch.Net.Utf8Json.Resolvers.DynamicMethodAnonymousFormatter1.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver) at Elasticsearch.Net.Utf8Json.JsonSerializer.Deserialize[T](Byte[] bytes, Int32 offset, IJsonFormatterResolver resolver) at Elasticsearch.Net.Utf8Json.JsonSerializer.DeserializeAsync[T](Stream stream, IJsonFormatterResolver resolver) at Elasticsearch.Net.ResponseBuilder.SetBodyAsync[TResponse](ApiCallDetails details, RequestData requestData, Stream responseStream, String mimeType, CancellationToken cancellationToken) at Elasticsearch.Net.ResponseBuilder.ToResponseAsync[TResponse](RequestData requestData, Exception ex, Nullable
1 statusCode, IEnumerable1 warnings, Stream responseStream, String mimeType, CancellationToken cancellationToken) at Elasticsearch.Net.HttpConnection.RequestAsync[TResponse](RequestData requestData, CancellationToken cancellationToken) at Elasticsearch.Net.RequestPipeline.CallElasticsearchAsync[TResponse](RequestData requestData, CancellationToken cancellationToken) at Elasticsearch.Net.Transport
1.RequestAsync[TResponse](HttpMethod method, String path, CancellationToken cancellationToken, PostData data, IRequestParameters requestParameters)
on match_all request after a sequential set of same requests.
Steps to reproduce:
- Start to execute the same heavy requests.
- After some time app starts to fire UnexpectedElasticsearchClientException.
Expected behavior A clear and concise description of what you expected to happen. Expected not to receive UnexpectedElasticsearchClientException.
Provide ConnectionSettings
(if relevant):
Provide DebugInformation
(if relevant):
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (10 by maintainers)
Top GitHub Comments
You are probably getting Elasticsearch engine exception in response body. You should check AWS ES “Error logs” to see what’s going on.
I have encountered the same error with NEST and AWS Elasticsearch in application logs.
expected:'"', actual:' ', at offset:61: UnexpectedElasticsearchClientException
Error logs in my case
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:314) [elasticsearch-7.4.2.jar:7.4.2] at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:139) [elasticsearch-7.4.2.jar:7.4.2]
…Caused by: org.elasticsearch.ElasticsearchException: Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max_open_scroll_context] setting.
@stevejgordon @russcam Exception:
The Response JSON: