quarkusio/quarkus · error · BuildException
Multiple extensions request different distributions of Elast
Error message
Multiple extensions request different distributions of Elasticsearch for Dev Services.
What it means
In the same aggregation loop, if two extensions request different distributions (ELASTIC vs OPENSEARCH) for the shared Dev Services container, the processor cannot pick one and throws a BuildException. Only one Dev Services search container is started, so all contributions must agree on the distribution.
Source
Thrown at extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/DevServicesElasticsearchProcessor.java:318
private static DevservicesElasticsearchBuildItemsConfiguration aggregateBuildItems(
List<DevservicesElasticsearchBuildItem> devservicesElasticsearchBuildItems) throws BuildException {
Set<String> hostsConfigProperties = new HashSet<>(devservicesElasticsearchBuildItems.size());
String version = null;
Distribution distribution = null;
for (DevservicesElasticsearchBuildItem buildItem : devservicesElasticsearchBuildItems) {
if (version == null) {
version = buildItem.getVersion();
} else if (buildItem.getVersion() != null && !version.equals(buildItem.getVersion())) {
throw new BuildException(
"Multiple extensions request different versions of Elasticsearch for Dev Services.",
Collections.emptyList());
}
if (distribution == null) {
distribution = buildItem.getDistribution();
} else if (buildItem.getDistribution() != null && !distribution.equals(buildItem.getDistribution())) {
throw new BuildException(
"Multiple extensions request different distributions of Elasticsearch for Dev Services.",
Collections.emptyList());
}
hostsConfigProperties.add(buildItem.getHostsConfigProperty());
}
return new DevservicesElasticsearchBuildItemsConfiguration(hostsConfigProperties, version, distribution);
}
private record DevservicesElasticsearchBuildItemsConfiguration(
Set<String> hostsConfigProperties, String version, Distribution distribution) {
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Remove or reconfigure the extension requesting the other distribution so all contributions agree
- Keep only one family of search extensions (all Elastic or all OpenSearch)
- Disable Dev Services for Elasticsearch and point both clients at a manually started instance
Example fix
// before: quarkus-elasticsearch (ELASTIC) + custom-search extension (OPENSEARCH) // after: remove custom-search extension or change its build item to Distribution.ELASTIC
Defensive patterns
Strategy: validation
Validate before calling
// ensure all search extensions target the same distribution // either all Elastic or all OpenSearch, else disable dev services: quarkus.elasticsearch.devservices.enabled=false quarkus.elasticsearch.hosts=localhost:9200
Prevention
- Standardize on one distribution family across all search extensions
- Check extension docs for which Distribution their build item requests
- Use a manually started instance when mixing clients
When it happens
Trigger: One extension produces a DevservicesElasticsearchBuildItem with distribution ELASTIC while another produces OPENSEARCH, e.g. mixing quarkus-elasticsearch-* with an OpenSearch-oriented extension.
Common situations: Adding an OpenSearch-compatible extension to an app that already uses the Elasticsearch extension; a custom extension hard-coding OPENSEARCH while the default is ELASTIC.
Related errors
- Wasn't able to determine the distribution of the search serv
- Multiple extensions request different versions of Elasticsea
- Unable to find file referenced in '${propertyKey}=${classpat
- Failed to open path tree with root %s
- Dev services for ${request.getName()} requires a startable s
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/1df434a63e97b949.
Report an issue: GitHub.