Failed to set maximum value is neither nor a number – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 1.3-1.3

Briefly, this error occurs when Elasticsearch tries to set a maximum value for a parameter, but the provided value is neither null nor a valid number. This could be due to a configuration error or incorrect input. To resolve this issue, you should check the configuration files or the input data for any non-numeric values. Ensure that the values provided are either null or valid numbers. If the error persists, you may need to debug your code to identify where the incorrect value is being set.

This guide will help you check for common problems that cause the log ” failed to set [{}]; maximum value is neither [{}] nor a number [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster, metadata and settings.

Log Context

Log “failed to set [{}]; maximum value is neither [{}] nor a number [{}]” classname is MetaDataUpdateSettingsService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

max = dataNodeCount - 1;
                    } else {
                        try {
                            max = Integer.parseInt(sMax);
                        } catch (NumberFormatException e) {
                            logger.warn("failed to set [{}]; maximum value is neither [{}] nor a number [{}]";
                                    e; IndexMetaData.SETTING_AUTO_EXPAND_REPLICAS; ALL_NODES_VALUE; sMax);
                            continue;
                        }
                    }

 

 [ratemypost]