Elasticsearch.Net.UnexpectedElasticsearchClientException: must contain a 'from' and 'to' value (Parameter 'value')
See original GitHub issueNEST/Elasticsearch.Net version: 7.10.1
Elasticsearch version: 7.9.3
Description of the problem including expected versus actual behavior:
I am using the _client.Indices.GetAsync(Indices.All);
(where _client
in Nest.IElasticClient
) in my code to retrieve all indices for an elasticSearch Cluster. The specific properties of and an index’s IndexState
that I am interested in are IndexState.Aliases
, IndexState.Settings.NumberOfReplicas
and indexState.Settings.NumberOfShards
. My ElasticSearch cluster is deployed on Aiven.
I get the exception from ElasticSearch
Elasticsearch.Net.UnexpectedElasticsearchClientException: must contain a 'from' and 'to' value (Parameter 'value')
See below for detailed Exception Stack Trace.
Observation: I ran the same client call on a ElasticSerach Instance running inside a local docker container in my machine and the call succeeded without any exceptions and i got the list of indices and details.
Expected behavior Get the list of indices on the cluster with all relevant details of the indices.
Provide DebugInformation
(if relevant):
2021-01-11T18:40:24+00:00 |ERR|54|system|0HM5MC165C8IV:00000002|Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware| An unhandled exception has occurred while executing the request.
Elasticsearch.Net.UnexpectedElasticsearchClientException: must contain a 'from' and 'to' value (Parameter 'value')
---> System.ArgumentException: must contain a 'from' and 'to' value (Parameter 'value')
at Nest.AutoExpandReplicas.Create(String value)
at Nest.AutoExpandReplicasFormatter.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver)
at Nest.DynamicIndexSettingsFormatter.ConvertToValue[T](Object setting, IJsonFormatterResolver formatterResolver)
at Nest.DynamicIndexSettingsFormatter.Set[T](IIndexSettings s, IDictionary`2 settings, String key, Action`1 assign, IJsonFormatterResolver formatterResolver)
at Nest.DynamicIndexSettingsFormatter.SetKnownIndexSettings(JsonReader& reader, IJsonFormatterResolver formatterResolver, IIndexSettings s)
at Nest.DynamicIndexSettingsFormatter.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver)
at Nest.IndexSettingsFormatter.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver)
at Deserialize(Object[] , JsonReader& , IJsonFormatterResolver )
at Elasticsearch.Net.Utf8Json.Resolvers.DynamicMethodAnonymousFormatter`1.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver)
at Nest.ResolvableDictionaryResponseFormatter`3.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, IEnumerable`1 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)
--- End of inner exception stack trace ---
at Elasticsearch.Net.Transport`1.RequestAsync[TResponse](HttpMethod method, String path, CancellationToken cancellationToken, PostData data, IRequestParameters requestParameters)
....... omiting out the entry point from our company proprietary stack trace
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
Thanks for confirming @rdasan. The fix for this is in (#5260) and will be in the next release 7.11.
@rdasan I don’t have a date for this at the moment I’m afraid as we’ll need to sync up with the 7.11 release of Elasticsearch once that’s good to go.