{"record":{"id":"095bbb732e79c74b","repo":"openzipkin/zipkin","slug":"no-name-property-in-filename","errorCode":null,"errorMessage":"no {name} property in {fileName}","messagePattern":"no (.+?) property in (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"zipkin-server/src/main/java/zipkin2/server/internal/elasticsearch/DynamicCredentialsFileLoader.java","lineNumber":58,"sourceCode":"    } catch (Exception e) {\n      LOGGER.error(\"Error loading elasticsearch credentials\", e);\n    }\n  }\n\n  void updateCredentialsFromProperties() throws IOException {\n    Properties properties = new Properties();\n    try (FileInputStream is = new FileInputStream(credentialsFile)) {\n      properties.load(is);\n    }\n    String username = ensureNotEmptyOrNull(properties, credentialsFile, USERNAME);\n    String password = ensureNotEmptyOrNull(properties, credentialsFile, PASSWORD);\n    basicCredentials.updateCredentials(username, password);\n  }\n\n  @Nullable static String ensureNotEmptyOrNull(Properties properties, String fileName, String name) {\n    String value = properties.getProperty(name);\n    if (value == null) {\n      throw new IllegalStateException(\"no \" + name + \" property in \" + fileName);\n    }\n    value = value.trim();\n    if (value.isEmpty()) {\n      throw new IllegalStateException(\"empty \" + name + \" property in \" + fileName);\n    }\n    return value;\n  }\n}\n","sourceCodeStart":40,"sourceCodeEnd":67,"githubUrl":"https://github.com/openzipkin/zipkin/blob/878ce2a1fad54ca941d17fdcf2e1d924b148eb1f/zipkin-server/src/main/java/zipkin2/server/internal/elasticsearch/DynamicCredentialsFileLoader.java#L40-L67","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before (credentials.properties)\nUserName=es-user\npasswd=secret\n\n# after\nusername=es-user\npassword=secret","handlingStrategy":"validation","validationCode":"Properties p = new Properties();\ntry (FileInputStream is = new FileInputStream(path)) { p.load(is); }\nfor (String k : new String[]{\"username\", \"password\"}) {\n  if (p.getProperty(k) == null) throw new IllegalStateException(\"credentials file missing key \" + k);\n}","typeGuard":null,"tryCatchPattern":"catch (IllegalStateException e) { log.error(\"ES credentials file invalid: {}\", e.getMessage()); fail startup — do not run with stale/no credentials }","preventionTips":["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"],"tags":["zipkin","elasticsearch","credentials","properties-file","configuration"],"backgroundTag":null,"analyzedSha":"878ce2a1fad54ca941d17fdcf2e1d924b148eb1f","analyzedAt":"2026-08-14T15:17:09.895Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}