# "could not read the current timestamp"

**URL:** <https://discuss.elastic.co/t/could-not-read-the-current-timestamp/344608>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [October 8, 2023, 7:56pm UTC](https://discuss.elastic.co/t/could-not-read-the-current-timestamp/344608 "2023-10-08T19:56:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunv707](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@arunv707](https://discuss.elastic.co/u/arunv707)\
**Post date:** [October 8, 2023, 7:56pm UTC](https://discuss.elastic.co/t/could-not-read-the-current-timestamp/344608/1 "2023-10-08T19:56:47Z")

</div>

I get the following in application logs. Could someone please help?

```auto
[2023-09-19T17:07:52,876][DEBUG][o.e.a.s.TransportSearchAction] [O1onMaP] [xxxxxx][0], node[a24qYwKTTUO6yFcWf8QRKg], [P], s[STARTED], a[id=50vjfxaPSuqAJSwQVbqtNA]: Failed to execute [SearchRequest{searchType=QUERY_THEN_FETCH, indices=[xxxxxx], indicesOptions=IndicesOptions[ignore_unavailable=false, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=true, ignore_aliases=false], types=[profile], routing='null', preference='null', requestCache=false, scroll=null, maxConcurrentShardRequests=15, batchedReduceSize=512, preFilterShardSize=128, allowPartialSearchResults=true, source={"suggest":{"suggestedKeyword":{"text":"Frenny","phrase":{"field":"text_all","size":1,"real_word_error_likelihood":0.95,"confidence":1.0,"separator":" ","max_errors":0.5,"gram_size":2,"force_unigrams":true,"token_limit":10,"collate":{"query":{"source":{"bool":{"filter":[{"range":{"lastLogin":{"from":"now-6M","include_lower":true,"include_upper":true,"to":null}}},{"terms":{"motherTongueId":["3","1"]}},{"term":{"gender":"m"}}],"must":{"multi_match":{"fields":["name^12","aboutMe^4","occupation^4","text_all^1"] __PATH__ charset=UTF-8"}},"prune":false}}}}}}]
RemoteTransportException[[a24qYwK][__IP__][__PATH__ [ __PATH__]]]; nested: QueryShardException[failed to create query: {
  "bool" : {
    "must" : [
      {
        "multi_match" : {
          "query" : "french",
          "fields" : [
            "aboutMe^4.0",
            "name^12.0",
            "occupation^4.0",
            "text_all^1.0"
          ],
          "type" : "best_fields",
          "operator" : "AND",
          "slop" : 0,
          "prefix_length" : 0,
          "max_expansions" : 50,
          "tie_breaker" : 0.0,
          "zero_terms_query" : "NONE",
          "auto_generate_synonyms_phrase_query" : true,
          "fuzzy_transpositions" : true,
          "boost" : 1.0
        }
      }
    ],
    "filter" : [
      {
        "range" : {
          "lastLogin" : {
            "from" : "now-6M",
            "to" : null,
            "include_lower" : true,
            "include_upper" : true,
            "boost" : 1.0
          }
        }
      },
      {
        "terms" : {
          "motherTongueId" : [
            "3",
            "1"
          ],
          "boost" : 1.0
        }
      },
      {
        "term" : {
          "gender" : {
            "value" : "m",
            "boost" : 1.0
          }
        }
      }
    ],
    "adjust_pure_negative" : true,
    "boost" : 1.0
  }
}]; nested: ElasticsearchParseException[could not read the current timestamp]; nested: IllegalArgumentException[features that prevent cachability are disabled on this context];
Caused by: [__PATH__] QueryShardException[failed to create query: {
  "bool" : {
    "must" : [
      {
        "multi_match" : {
          "query" : "french",
          "fields" : [
            "aboutMe^4.0",
            "name^12.0",
            "occupation^4.0",
            "text_all^1.0"
          ],
          "type" : "best_fields",
          "operator" : "AND",
          "slop" : 0,
          "prefix_length" : 0,
          "max_expansions" : 50,
          "tie_breaker" : 0.0,
          "zero_terms_query" : "NONE",
          "auto_generate_synonyms_phrase_query" : true,
          "fuzzy_transpositions" : true,
          "boost" : 1.0
        }
      }
    ],
    "filter" : [
      {
        "range" : {
          "lastLogin" : {
            "from" : "now-6M",
            "to" : null,
            "include_lower" : true,
            "include_upper" : true,
            "boost" : 1.0
          }
        }
      },
      {
        "terms" : {
          "motherTongueId" : [
            "3",
            "1"
          ],
          "boost" : 1.0
        }
      },
      {
        "term" : {
          "gender" : {
            "value" : "m",
            "boost" : 1.0
          }
        }
      }
    ],
    "adjust_pure_negative" : true,
    "boost" : 1.0
  }
}]; nested: ElasticsearchParseException[could not read the current timestamp]; nested: IllegalArgumentException[features that prevent cachability are disabled on this context];
	at org.elasticsearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:321)
	at org.elasticsearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:304)
	at org.elasticsearch.search.suggest.phrase.PhraseSuggester.innerExecute(PhraseSuggester.java:122)
	at org.elasticsearch.search.suggest.phrase.PhraseSuggester.innerExecute(PhraseSuggester.java:53)
	at org.elasticsearch.search.suggest.Suggester.execute(Suggester.java:39)
	at org.elasticsearch.search.suggest.SuggestPhase.execute(SuggestPhase.java:64)
	at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:95)
	at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:324)
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:357)
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:333)
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:329)
	at org.elasticsearch.search.SearchService$3.doRun(SearchService.java:1019)
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: ElasticsearchParseException[could not read the current timestamp]; nested: IllegalArgumentException[features that prevent cachability are disabled on this context];
	at org.elasticsearch.common.joda.DateMathParser.parse(DateMathParser.java:60)
	at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.parseToMilliseconds(DateFieldMapper.java:318)
	at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.isFieldWithinQuery(DateFieldMapper.java:331)
	at org.elasticsearch.index.query.RangeQueryBuilder.getRelation(RangeQueryBuilder.java:459)
	at org.elasticsearch.index.query.RangeQueryBuilder.doRewrite(RangeQueryBuilder.java:466)
	at org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:269)
	at org.elasticsearch.index.query.BoolQueryBuilder.rewriteClauses(BoolQueryBuilder.java:474)
	at org.elasticsearch.index.query.BoolQueryBuilder.doRewrite(BoolQueryBuilder.java:441)
	at org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:269)
	at org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:51)
	at org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:68)
	at org.elasticsearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:316)
	... 18 more
Caused by: java.lang.IllegalArgumentException: features that prevent cachability are disabled on this context
	at org.elasticsearch.index.query.QueryShardContext.failIfFrozen(QueryShardContext.java:357)
	at org.elasticsearch.index.query.QueryShardContext.nowInMillis(QueryShardContext.java:391)
	at org.elasticsearch.common.joda.DateMathParser.parse(DateMathParser.java:58)
	... 29 more
[2023-09-19T17:07:52,876][DEBUG][o.e.a.s.TransportSearchAction] [O1onMaP] All shards failed for phase: [query]
ElasticsearchParseException[could not read the current timestamp]; nested: IllegalArgumentException[features that prevent cachability are disabled on this context];
	at org.elasticsearch.common.joda.DateMathParser.parse(DateMathParser.java:60)
	at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.parseToMilliseconds(DateFieldMapper.java:318)
	at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.isFieldWithinQuery(DateFieldMapper.java:331)
	at org.elasticsearch.index.query.RangeQueryBuilder.getRelation(RangeQueryBuilder.java:459)
	at org.elasticsearch.index.query.RangeQueryBuilder.doRewrite(RangeQueryBuilder.java:466)
	at org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:269)
	at org.elasticsearch.index.query.BoolQueryBuilder.rewriteClauses(BoolQueryBuilder.java:474)
	at org.elasticsearch.index.query.BoolQueryBuilder.doRewrite(BoolQueryBuilder.java:441)
	at org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:269)
	at org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:51)
	at org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:68)
	at org.elasticsearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:316)
	at org.elasticsearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:304)
	at org.elasticsearch.search.suggest.phrase.PhraseSuggester.innerExecute(PhraseSuggester.java:122)
	at org.elasticsearch.search.suggest.phrase.PhraseSuggester.innerExecute(PhraseSuggester.java:53)
	at org.elasticsearch.search.suggest.Suggester.execute(Suggester.java:39)
	at org.elasticsearch.search.suggest.SuggestPhase.execute(SuggestPhase.java:64)
	at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:95)
	at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:324)
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:357)
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:333)
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:329)
	at org.elasticsearch.search.SearchService$3.doRun(SearchService.java:1019)
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.IllegalArgumentException: features that prevent cachability are disabled on this context
	at org.elasticsearch.index.query.QueryShardContext.failIfFrozen(QueryShardContext.java:357)
	at org.elasticsearch.index.query.QueryShardContext.nowInMillis(QueryShardContext.java:391)
	at org.elasticsearch.common.joda.DateMathParser.parse(DateMathParser.java:58)
	... 29 more

```

Please let me know if more information is needed.

Thanks much in advance!

---

<div class="post-metadata">

**Author:** ![arunv707](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@arunv707](https://discuss.elastic.co/u/arunv707)\
**Post date:** [October 26, 2023, 3:59am UTC](https://discuss.elastic.co/t/could-not-read-the-current-timestamp/344608/2 "2023-10-26T03:59:25Z")

</div>

Could someone please help?

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 23, 2023, 4:00am UTC](https://discuss.elastic.co/t/could-not-read-the-current-timestamp/344608/3 "2023-11-23T04:00:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
