Briefly, this error occurs when the size setting for the shared cache in Elasticsearch is set to a negative value. Elasticsearch requires this value to be non-negative for proper functioning. To resolve this issue, you can adjust the shared cache size setting in your Elasticsearch configuration file (elasticsearch.yml) to a non-negative value. Alternatively, you can use the Elasticsearch API to update this setting dynamically, again ensuring the value is non-negative.
This guide will help you check for common problems that cause the log ” setting [{}] must be non-negative”; SHARED_CACHE_SETTINGS_PREFIX + “size ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “setting [{}] must be non-negative”; SHARED_CACHE_SETTINGS_PREFIX + “size” class name is SharedBlobCacheService.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :
} @Override public void validate(final RelativeByteSizeValue value; final Map; Object> settings) { if (value.isAbsolute() && value.getAbsolute().getBytes() == -1) { throw new SettingsException("setting [{}] must be non-negative"; SHARED_CACHE_SETTINGS_PREFIX + "size"); } if (value.isNonZeroSize()) { @SuppressWarnings("unchecked") final List roles = (List ) settings.get(NodeRoleSettings.NODE_ROLES_SETTING); final var rolesSet = Set.copyOf(roles);
[ratemypost]