{"record":{"id":"2d4b1a4b0192ce11","repo":"SonarSource/sonarqube","slug":"unable-to-configure-file-specified-in-does-n","errorCode":null,"errorMessage":"Unable to configure: . File specified in [] does not exist","messagePattern":"Unable to configure: \\. File specified in \\[\\] does not exist","errorType":"validation","errorClass":"MessageException","httpStatus":null,"severity":"error","filePath":"server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java","lineNumber":152,"sourceCode":"        builder.put(\"xpack.security.http.ssl.enabled\", Boolean.TRUE.toString());\n        builder.put(\"xpack.security.http.ssl.keystore.path\", clusterESHttpKeystoreFileName);\n      }\n    } else {\n      builder.put(\"xpack.security.autoconfiguration.enabled\", Boolean.FALSE.toString());\n      builder.put(\"xpack.security.enabled\", Boolean.FALSE.toString());\n    }\n  }\n\n  private String getFileNameFromPathProperty(ProcessProperties.Property processProperty) {\n    String processPropertyPath = props.value(processProperty.getKey());\n\n    if (processPropertyPath == null) {\n      throw new MessageException(processProperty.getKey() + \" property need to be set \" +\n        \"when using elastic search authentication\");\n    }\n    Path path = Paths.get(processPropertyPath);\n    if (!path.toFile().exists()) {\n      throw new MessageException(\"Unable to configure: \" + processProperty.getKey() + \". \"\n        + \"File specified in [\" + processPropertyPath + \"] does not exist\");\n    }\n    if (!path.toFile().canRead()) {\n      throw new MessageException(\"Unable to configure: \" + processProperty.getKey() + \". \"\n        + \"Could not get read access to [\" + processPropertyPath + \"]\");\n    }\n    return path.getFileName().toString();\n  }\n\n  private void configureNetwork(Map<String, String> builder) {\n    if (!clusterEnabled) {\n      InetAddress searchHost = resolveAddress(SEARCH_HOST);\n      int searchPort = Integer.parseInt(props.nonNullValue(SEARCH_PORT.getKey()));\n      builder.put(ES_HTTP_HOST_KEY, searchHost.getHostAddress());\n      builder.put(ES_HTTP_PORT_KEY, valueOf(searchPort));\n      builder.put(\"discovery.type\", \"single-node\");\n\n      int transportPort = Integer.parseInt(props.nonNullValue(ES_PORT.getKey()));","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java#L134-L170","documentation":"After confirming a store path property is set, getFileNameFromPathProperty checks that the referenced file exists. If Paths.get(...).toFile().exists() is false it throws this MessageException including the property key and the configured path.","triggerScenarios":"sonar.cluster.es.ssl.keystore.path / truststore.path / http.keystore.path points to a file that does not exist on the node (typo, wrong absolute path, file not copied to this cluster node).","commonSituations":"Certificates generated on one node but not distributed to others; relative paths interpreted against the wrong working directory; keystore deleted or renamed after config was written.","solutions":["Create/copy the keystore or truststore file to the exact path given in the property","Fix the property value to the correct absolute path of the existing file","Ensure the file was deployed to every node of the cluster, not just the first","Use absolute paths to avoid ambiguity about the process working directory"],"exampleFix":"# before\nsonar.cluster.es.ssl.keystore.path=/etc/sonarqube/keystore.p12   # file absent\n# after\nls /etc/sonarqube/ssl/keystore.p12  # ensure present\nsonar.cluster.es.ssl.keystore.path=/etc/sonarqube/ssl/keystore.p12","handlingStrategy":"validation","validationCode":"String p = props.get(\"sonar.cluster.es.ssl.keystore.path\");\nif (p != null && !new File(p).isFile()) throw new IllegalStateException(\"ES keystore file missing: \" + p);","typeGuard":null,"tryCatchPattern":"try { esSettings.build(); } catch (MessageException e) { log.error(\"ES store file missing: {}\", e.getMessage()); throw new ConfigurationException(e); }","preventionTips":["Deploy certificates to every cluster node with identical absolute paths","Use configuration management (Ansible/Puppet) to ship stores before service start","Prefer absolute paths over relative ones","Re-verify paths after any certificate rotation or rename"],"tags":["elasticsearch","configuration","file-not-found","tls"],"backgroundTag":"file-not-found","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}