elastic/elasticsearch · error · IllegalArgumentException
invalid dot validation exception pattern: [{}]
Error message
invalid dot validation exception pattern: [{}] What it means
IllegalArgumentException thrown while validating the dynamic setting cluster.indices.validate_ignored_dot_patterns: each configured string is compiled with Pattern.compile, and an invalid regex surfaces the offending pattern and chains the PatternSyntaxException as cause. This is a bootstrap-time / settings-update-time guard, not a per-request one.
Source
Thrown at modules/dot-prefix-validation/src/main/java/org/elasticsearch/validation/DotPrefixValidator.java:108
"\\.monitoring-ent-search-8-.*",
// data streams defined in files in x-pack/plugin/core/template-resources/src/main/resources/fleet-*:
"\\.fleet-fileds-fromhost-data-.*",
"\\.fleet-fileds-fromhost-meta-.*",
"\\.fleet-fileds-tohost-data-.*",
"\\.fleet-fileds-tohost-meta-.*",
// data stream definied in x-pack/plugin/core/template-resources/src/main/resources/kibana-reporting@template.json:
"\\.kibana-reporting.*",
// data stream defined in x-pack/plugin/core/template-resources/src/main/resources/slm-history.json:
"\\.slm-history-7.*",
// index defined in
// x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/connector/ConnectorTemplateRegistry.java
"\\.search-acl-filter-.*"
),
(patternList) -> patternList.forEach(pattern -> {
try {
Pattern.compile(pattern);
} catch (PatternSyntaxException e) {
throw new IllegalArgumentException("invalid dot validation exception pattern: [" + pattern + "]", e);
}
}),
Setting.Property.NodeScope,
Setting.Property.Dynamic
);
DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(DotPrefixValidator.class);
private final ThreadContext threadContext;
private final SystemIndices systemIndices;
private final boolean isEnabled;
private final boolean isStateless;
private volatile Set<Pattern> ignoredIndexPatterns;
public DotPrefixValidator(ThreadContext threadContext, ClusterService clusterService, SystemIndices systemIndices) {
this.threadContext = threadContext;
this.systemIndices = systemIndices;
this.isEnabled = VALIDATE_DOT_PREFIXES.get(clusterService.getSettings());View on GitHub (pinned to db6a809a66)
Solutions
- Fix the offending regex entry (proper escaping; Java regex, not glob)
- Test each pattern with Pattern.compile locally before applying
- If you need a literal dot prefix, anchor it as "\\.name-.*"
Example fix
// before
PUT _cluster/settings
{"persistent":{"cluster.indices.validate_ignored_dot_patterns":[".myapp-.*"]}} // leading dot is literal but pattern is loose
// after
PUT _cluster/settings
{"persistent":{"cluster.indices.validate_ignored_dot_patterns":["\\.myapp-.*"]}} Defensive patterns
Strategy: validation
Validate before calling
// Validate each pattern before applying the setting:
for (String p : patterns) {
try { Pattern.compile(p); }
catch (PatternSyntaxException e) { throw new IllegalArgumentException("bad pattern: " + p, e); }
} Try / catch
try { clusterClient.updateSettings(persistent); }
catch (IllegalArgumentException e) { /* e.getCause() is PatternSyntaxException; fix and retry */ } Prevention
- Remember these are Java regex, not globs — escape dots as "\\."
- Unit-test new patterns with Pattern.compile before pushing to production
- Apply settings changes via config-as-code pipelines with a validation stage
When it happens
Trigger: PUT /_cluster/settings updating cluster.indices.validate_ignored_dot_patterns with an entry containing invalid regex syntax (unclosed bracket, dangling meta-char, bad escape). The Setting validator runs on apply.
Common situations: Operator adds a custom ignore pattern with a typo (e.g. missing closing ] or unescaped '.'); copy/paste from docs that lost escaping; expecting glob semantics and writing '*.' instead of '\..*'.
Related errors
- invalid value [{}] must be one of [true,false,limited]
- files entitlement with a 'path_setting' must specify 'basedi
- Index [{}] name beginning with a dot (.) is not allowed
- failed to parse value [{}] for setting [{}], must be [-1b] (
- [painless.regex.enabled] can only be set on node startup.
AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12).
Data as JSON: /api/errors/528d6407fe818f00.
Report an issue: GitHub.