apache/cassandra · error · IllegalArgumentException
'%skeystore_password' and '%skey_password' both…
Error message
'%skeystore_password' and '%skey_password' both configurations are given and the values do not match
What it means
Fired in PEMBasedSslContextFactory.validatePasswords (called from the constructor): the inline keystore_password and key_password are both configured but do not match (same check for outbound pairs). For PEM, keystore and key passwords must be identical when both are provided, so a ConfigurationException is thrown at startup.
Solutions
- Make keystore_password and key_password identical in the PEM SSL configuration, or remove key_password so keystore_password is used
- Update cassandra.yaml so the passwords match, then restart
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/security/PEMBasedSslContextFactory.java:111 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/7249ecba37e1c51a.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/security/PEMBasedSslContextFactory.java:111
private PEMBasedKeyStoreContext pemEncodedTrustCertificates;
private PEMBasedKeyStoreContext pemEncodedKeyContext;
private PEMBasedKeyStoreContext pemEncodedOutboundKeyContext;
public PEMBasedSslContextFactory()
{
}
private void validatePasswords()
{
boolean shouldThrow = !keystoreContext.passwordMatchesIfPresent(pemEncodedKeyContext.password)
|| !outboundKeystoreContext.passwordMatchesIfPresent(pemEncodedOutboundKeyContext.password);
boolean outboundPasswordMismatch = !outboundKeystoreContext.passwordMatchesIfPresent(pemEncodedOutboundKeyContext.password);
String keyName = outboundPasswordMismatch ? "outbound_" : "";
if (shouldThrow)
{
final String msg = String.format("'%skeystore_password' and '%skey_password' both configurations are given and the values do not match", keyName, keyName);
throw new IllegalArgumentException(msg);
}
}
public PEMBasedSslContextFactory(Map<String, Object> parameters)
{
super(parameters);
final String pemEncodedKey = getString(ConfigKey.ENCODED_KEY.getKeyName());
final String pemEncodedKeyPassword = StringUtils.defaultString(getString(ConfigKey.KEY_PASSWORD.getKeyName()), keystoreContext.password);
pemEncodedKeyContext = new PEMBasedKeyStoreContext(pemEncodedKey, pemEncodedKeyPassword, StringUtils.isEmpty(pemEncodedKey), keystoreContext);
final String pemEncodedOutboundKey = StringUtils.defaultString(getString(ConfigKey.OUTBOUND_ENCODED_KEY.getKeyName()), pemEncodedKey);
final String outboundKeyPassword = StringUtils.defaultString(StringUtils.defaultString(getString(ConfigKey.OUTBOUND_ENCODED_KEY_PASSWORD.getKeyName()),
outboundKeystoreContext.password), pemEncodedKeyPassword);
pemEncodedOutboundKeyContext = new PEMBasedKeyStoreContext(pemEncodedKey, outboundKeyPassword, StringUtils.isEmpty(pemEncodedOutboundKey), outboundKeystoreContext);
validatePasswords();
if (!StringUtils.isEmpty(trustStoreContext.password))View on GitHub (pinned to 88fd0f6a0e)