openzipkin/zipkin · critical · IllegalStateException
no {name} property in {fileName}
Error message
no {name} property in {fileName} What it means
DynamicCredentialsFileLoader.ensureNotEmptyOrNull throws IllegalStateException ('no {name} property in {fileName}') when the Elasticsearch credentials properties file exists but does not contain the required username or password key. The loader parses a Java properties file on a schedule to rotate ES basic-auth credentials; a missing key means the file cannot produce a complete credential pair, so it refuses rather than silently clearing credentials.
Source
Thrown at zipkin-server/src/main/java/zipkin2/server/internal/elasticsearch/DynamicCredentialsFileLoader.java:58
} catch (Exception e) {
LOGGER.error("Error loading elasticsearch credentials", e);
}
}
void updateCredentialsFromProperties() throws IOException {
Properties properties = new Properties();
try (FileInputStream is = new FileInputStream(credentialsFile)) {
properties.load(is);
}
String username = ensureNotEmptyOrNull(properties, credentialsFile, USERNAME);
String password = ensureNotEmptyOrNull(properties, credentialsFile, PASSWORD);
basicCredentials.updateCredentials(username, password);
}
@Nullable static String ensureNotEmptyOrNull(Properties properties, String fileName, String name) {
String value = properties.getProperty(name);
if (value == null) {
throw new IllegalStateException("no " + name + " property in " + fileName);
}
value = value.trim();
if (value.isEmpty()) {
throw new IllegalStateException("empty " + name + " property in " + fileName);
}
return value;
}
}
View on GitHub (pinned to 878ce2a1fa)
Solutions
- Add both keys to the credentials file: username=<user> and password=<pass> (exact lowercase keys)
- Verify the file is java .properties format (key=value lines, no colons/YAML nesting)
- Confirm the path in zipkin.storage.elasticsearch.credentials-file points at the file you edited
Example fix
# before (credentials.properties) UserName=es-user passwd=secret # after username=es-user password=secret
Defensive patterns
Strategy: validation
Validate before calling
Properties p = new Properties();
try (FileInputStream is = new FileInputStream(path)) { p.load(is); }
for (String k : new String[]{"username", "password"}) {
if (p.getProperty(k) == null) throw new IllegalStateException("credentials file missing key " + k);
} Try / catch
catch (IllegalStateException e) { log.error("ES credentials file invalid: {}", e.getMessage()); fail startup — do not run with stale/no credentials } Prevention
- Validate credentials files in a pre-deploy check (CI) with the same key names the loader expects
- When using secret managers, template the file once and assert both keys render
When it happens
Trigger: Setting zipkin.storage.elasticsearch.credentials-file to a properties file that lacks the 'username' or 'password' key (exact case-sensitive keys), or where keys are commented out with '#'. Triggered at startup and on every refresh interval tick.
Common situations: Operators write the credentials file with wrong key casing (UserName vs username), use YAML instead of java properties syntax, or typo key names; secrets-injection systems (vault agent, k8s secrets) render a file without the expected keys.
Related errors
- empty {name} property in {fileName}
- No valid endpoints found in ES hosts: {hosts}
- credential refresh thread didn't start
- dateSeparator must be empty or a single character
- No content reading Elasticsearch/OpenSearch version
AI-assisted analysis of openzipkin/zipkin@878ce2a1fa (2026-08-14).
Data as JSON: /api/errors/095bbb732e79c74b.
Report an issue: GitHub.