openzipkin/zipkin · critical · IllegalStateException

empty {name} property in {fileName}

Error message

empty {name} property in {fileName}

What it means

DynamicCredentialsFileLoader.ensureNotEmptyOrNull throws IllegalStateException ('empty {name} property in {fileName}') when the credentials properties file defines the username or password key but its value trims to the empty string. Because an empty credential would fail HTTP basic auth in a confusing way, the loader validates that values are non-blank before applying them to BasicCredentials.

Source

Thrown at zipkin-server/src/main/java/zipkin2/server/internal/elasticsearch/DynamicCredentialsFileLoader.java:62

  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

  1. Set a real non-blank value for both username and password in the file
  2. If credentials are injected by a secret manager, verify the referenced secret keys actually hold values
  3. Remove placeholder empty entries until real values are available

Example fix

# before
username=
password=

# after
username=es-user
password=correct-horse-battery-staple
Defensive patterns

Strategy: validation

Validate before calling

String v = p.getProperty("username");
if (v == null || v.trim().isEmpty()) throw new IllegalStateException("username missing/blank");

Prevention

When it happens

Trigger: A credentials file containing 'username=' with no value, or a value made only of whitespace (e.g. 'username '). Evaluated at startup and on each scheduled refresh of the credentials file.

Common situations: Templating systems render an empty value because the secret variable was unset; a human creates a placeholder file with empty values intending to fill it later; trailing-whitespace edits in the secret file.

Related errors


AI-assisted analysis of openzipkin/zipkin@878ce2a1fa (2026-08-14). Data as JSON: /api/errors/dcd78ea8809d4f16. Report an issue: GitHub.