NationalSecurityAgency/ghidra · error · ElasticException
Missing critical configuration value:
Error message
Missing critical configuration value:
What it means
Thrown in getCriticalValue when a required configuration key is absent from the key/value map loaded by readKeyValues. Critical keys include name, owner, description, major, minor, and settings. The missing key name is appended to the error message for diagnosis.
Solutions
- Read the missing key name from the error message and either re-add it to the configuration index manually or recreate the database.
- Drop and recreate the database using a BSim client version compatible with the stored LAYOUT_VERSION.
- Verify that the BSim client version matches the database schema version (compareLayout should return 0).
- Inspect all configuration documents via curl GET <repo>_configuration/_search to see which keys are present.
Defensive patterns
Strategy: validation
Validate before calling
// Verify all critical configuration keys are present
String[] requiredKeys = {"name", "owner", "description", "major", "minor", "settings"};
for (String key : requiredKeys) {
if (!keyValue.containsKey(key)) {
throw new IllegalStateException("Missing configuration key: " + key);
}
} Try / catch
try {
database.initialize();
} catch (ElasticException e) {
if (e.getMessage().startsWith("Missing critical configuration value:")) {
String missingKey = e.getMessage().substring(e.getMessage().lastIndexOf(' ') + 1);
Msg.error(this, "Configuration key '" + missingKey + "' is missing; database may need recreation.");
}
throw e;
} Prevention
- Use a consistent BSim version for database creation and querying to avoid configuration key mismatches.
- After creation, inspect all configuration documents to confirm required keys are present.
- Check compareLayout() returns 0 before querying to detect version incompatibility.
When it happens
Trigger: During initialize() -> readBasicInfo, getCriticalValue is called for each required key against the HashMap populated from the configuration index. If keyValue.get(key) returns null for any critical key, this exception is thrown.
Common situations: Database created by an older or newer BSim version that uses a different set of configuration keys; a configuration document was manually deleted from the index; interrupted writeBasicInfo that wrote some but not all key/value documents.
Related errors
- weighttable has wrong number of rows
- Database instance does not exist
- Unrecoverable error: Could not find configuration
- Cluster did not accept settings for index:
- Could not fetch key value
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/1a10e2f74ed18c1d.
Report an issue: GitHub.
Appendix: source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java:2143
continue; // This might be the "sequence" document
}
res.put(key, value.getAsString());
}
return res;
}
/**
* Given a critical key in the database configuration, return its corresponding value
* @param key is the configuration key
* @param keyValue is the key/value map
* @return the corresponding value
* @throws ElasticException if the key is missing
*/
private String getCriticalValue(String key, Map<String, String> keyValue)
throws ElasticException {
String value = keyValue.get(key);
if (value == null) {
throw new ElasticException("Missing critical configuration value: " + key);
}
return value;
}
/**
* Write DatabaseInformation to database in one bulk request. If -k- and -L- are greater than zero, they are written as well
* @param k (optional) is the database k parameter
* @param L (optional) is the database L parameter
* @throws ElasticException for communication problems with the server
*/
private void writeBasicInfo(int k, int L) throws ElasticException {
StringBuilder buffer = new StringBuilder();
buffer.append("{ \"index\": { \"_id\": \"name\" } }\n");
buffer.append("{ \"type\": \"keyvalue\", \"value\": \"")
.append(info.databasename)
.append("\" }\n");
buffer.append("{ \"index\": { \"_id\": \"owner\" } }\n");
buffer.append("{ \"type\": \"keyvalue\", \"value\": \"")View on GitHub (pinned to d5f144c24d)