openzipkin/zipkin · critical · IllegalArgumentException
.version.number not found in response: %s
Error message
.version.number not found in response: %s
What it means
BaseVersion.Parser.convert() throws IllegalArgumentException('.version.number not found in response: %s') when the root endpoint responded with JSON but no version.number field could be extracted (or parsing failed and was swallowed by the empty catch). The full body is included in the message for diagnosis.
Source
Thrown at zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/BaseVersion.java:88
while (parser.nextToken() != null) {
if (parser.currentToken() == JsonToken.VALUE_STRING) {
switch (parser.currentName()) {
case "distribution":
distribution = parser.getText();
break;
case "number":
version = parser.getText();
break;
}
}
}
}
} catch (RuntimeException | IOException possiblyParseException) {
// EmptyCatch ignored
}
if (version == null) {
throw new IllegalArgumentException(
".version.number not found in response: " + contentString.get());
}
Matcher matcher = REGEX.matcher(version);
if (!matcher.matches()) {
throw new IllegalArgumentException("Invalid .version.number: " + version);
}
try {
int major = Integer.parseInt(matcher.group(1));
int minor = Integer.parseInt(matcher.group(2));
if ("opensearch".equalsIgnoreCase(distribution)) {
return new OpensearchVersion(major, minor);
} else {
return new ElasticsearchVersion(major, minor);
}
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid .version.number: " + versionView on GitHub (pinned to 878ce2a1fa)
Solutions
- curl the configured URL root and confirm the body contains version.number; fix routing/auth if it is an error payload.
- Use a plain Elasticsearch 7+/OpenSearch endpoint supported by this Zipkin version.
- If a proxy rewrites responses, exclude the ES host from rewriting.
Defensive patterns
Strategy: validation
Validate before calling
JsonNode root = http.getJson(esUrl + "/");
if (root.path("version").path("number").isMissingNode()) throw new IllegalStateException("No version.number at " + esUrl + ": " + root); Type guard
static boolean looksLikeEsRoot(JsonNode n) { return n != null && n.path("version").path("number").isTextual(); } Try / catch
catch (IllegalArgumentException e) { if (e.getMessage().startsWith(".version.number not found")) logResponseBodyAndFixAuthOrRouting(); else throw e; } Prevention
- Verify auth returns real node info (not an error JSON) for the configured credentials.
- Exclude the ES host from response-rewriting proxies.
When it happens
Trigger: GET / returns valid JSON lacking a version.number field — e.g. a shield in front of ES, an ES fork with a different root payload, or an error JSON like {"error":...}.
Common situations: API-key/OAuth proxies returning a JSON error body with 200; ES plugins that replace the root handler; pointing at OpenSearch Serverless or other incompatible front-ends.
Related errors
- No content reading Elasticsearch/OpenSearch version
- Invalid .version.number: %s
- Invalid .version.number: %s, for .version.distribution:%s
- no {name} property in {fileName}
- empty {name} property in {fileName}
AI-assisted analysis of openzipkin/zipkin@878ce2a1fa (2026-08-14).
Data as JSON: /api/errors/8dc161a3301c2588.
Report an issue: GitHub.