Skip to content

RANGER-5199 : Connection to Ranger KMS DB fails with secure MySQL/Maria DB #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dhavalshah9131
Copy link
Contributor

@dhavalshah9131 dhavalshah9131 commented Apr 22, 2025

What changes were proposed in this pull request?

RANGER-5199 : Connection to Ranger KMS DB fails with secure MySQL/maria DB

Facing below error while connecting to secure mysql/maria DB.

ERROR org.apache.hadoop.crypto.key.RangerKeyStoreProvider: [main]: ==> RangerKeyStoreProvider.reloadKeys() error : 
java.lang.RuntimeException: Error while generating Ranger Master key, Error - Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure


The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Error Code: 0
	at org.apache.hadoop.crypto.key.RangerKeyStoreProvider.generateAndGetMasterKey(RangerKeyStoreProvider.java:296) ~[ranger-kms.jar:?]
	at org.apache.hadoop.crypto.key.RangerKeyStoreProvider.<init>(RangerKeyStoreProvider.java:263) ~[ranger-kms.jar:?]
	at org.apache.hadoop.crypto.key.RangerKeyStoreProvider$Factory.createProvider(RangerKeyStoreProvider.java:742) ~[ranger-kms.jar:?]
	at org.apache.hadoop.crypto.key.kms.server.KMSWebApp.createKeyProvider(KMSWebApp.java:111) ~[ranger-kms.jar:?]
	at org.apache.hadoop.crypto.key.kms.server.KMSWebApp.contextInitialized(KMSWebApp.java:175) ~[ranger-kms-.jar:?] 

We need ranger-kms backend side fix to append ?useSSL=false when using mysql/mariadb databases.

How was this patch tested?

1.) Manual testing with secure DB
2.) Successful build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant