Epoch “+ formatter +” is not supported as dynamic date format – How to solve this Elasticsearch error

Opster Team

July-20, Version: 1.7-8.0

Before you begin reading this guide, we recommend you try running the Elasticsearch Error Check-Up which analyzes 2 JSON files to detect many configuration errors.

Briefly, this error occurs when the epoch formatter is used as a dynamic date format in Elasticsearch. The epoch formatter is a way to represent dates as the number of seconds since January 1, 1970, but it cannot be used as a dynamic date format in Elasticsearch. To resolve the issue, use a supported dynamic date format instead of the epoch formatter.

To easily locate the root cause and resolve this issue try AutoOps for Elasticsearch & OpenSearch. It diagnoses problems by analyzing hundreds of metrics collected by a lightweight agent and offers guidance for resolving them.

Take a self-guided product tour to see for yourself (no registration required).

This guide will help you check for common problems that cause the log ” Epoch “+ formatter +” is not supported as dynamic date format ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index.

Log Context

Log “Epoch [“+ formatter +”] is not supported as dynamic date format”classname  is RootObjectMapper.java We extracted the following from Elasticsearch source code for those seeking an in-depth context :

if (fieldName.equals("date_formats") || fieldName.equals("dynamic_date_formats")) {
 if (fieldNode instanceof List) {
 List formatters = new ArrayList<>();
 for (Object formatter : (List) fieldNode) {
 if (formatter.toString().startsWith("epoch_")) {
 throw new MapperParsingException("Epoch ["+ formatter +"] is not supported as dynamic date format");
 }
 formatters.add(parseDateTimeFormatter(formatter));
 }
 builder.dynamicDateTimeFormatter(formatters);
 } else if ("none".equals(fieldNode.toString())) {

 

Watch product tour

Try AutoOps to find & fix Elasticsearch problems

Analyze Your Cluster
Skip to content