Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

MongoDB Driver connection issue

Hello community,

I'm attempting to connect streamsets to a MongoDB instance in order to load data into a Cloudera HDFS. The process seemed straight-forward until I tried to validate the pipeline. I get an error related to the SASL authentication mechanism, likely due to missing java libraries (seems like the SecretKeyFactory class or something similar is missing). The error reads (exception log):

com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='datalakereader', source='OCPDCS', password=<hidden>, mechanismProperties={}} at com.mongodb.connection.SaslAuthenticator.wrapException(SaslAuthenticator.java:162) at com.mongodb.connection.SaslAuthenticator.access$200(SaslAuthenticator.java:39) at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:68) at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:46) at com.mongodb.connection.SaslAuthenticator.doAsSubject(SaslAuthenticator.java:168) at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:46) at com.mongodb.connection.DefaultAuthenticator.authenticate(DefaultAuthenticator.java:32) at com.mongodb.connection.InternalStreamConnectionInitializer.authenticateAll(InternalStreamConnectionInitializer.java:109) at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:46) at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:108) at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:111) at java.lang.Thread.run(Thread.java:748) Caused by: javax.security.sasl.SaslException: Unable to find PBKDF2WithHmacSHA1. [Caused by java.security.NoSuchAlgorithmException: PBKDF2WithHmacSHA1 SecretKeyFactory not available] at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.hi(ScramSha1Authenticator.java:229) at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.computeClientFinalMessage(ScramSha1Authenticator.java:166) at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.evaluateChallenge(ScramSha1Authenticator.java:99) at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:57) ... 9 more Caused by: java.security.NoSuchAlgorithmException: PBKDF2WithHmacSHA1 SecretKeyFactory not available at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122) at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160) at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.hi(ScramSha1Authenticator.java:226) ... 12 more

Any idea how I can quickly remedy the situation?

Thank you very much!

MongoDB Driver connection issue

Hello community,

I'm attempting to connect streamsets to a MongoDB instance in order to load data into a Cloudera HDFS. The process seemed straight-forward until I tried to validate the pipeline. I get an error related to the SASL authentication mechanism, likely due to missing java libraries (seems like the SecretKeyFactory class or something similar is missing). The error reads (exception log):

com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='datalakereader', source='OCPDCS', password=<hidden>, mechanismProperties={}}
    at com.mongodb.connection.SaslAuthenticator.wrapException(SaslAuthenticator.java:162)
    at com.mongodb.connection.SaslAuthenticator.access$200(SaslAuthenticator.java:39)
    at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:68)
    at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:46)
    at com.mongodb.connection.SaslAuthenticator.doAsSubject(SaslAuthenticator.java:168)
    at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:46)
    at com.mongodb.connection.DefaultAuthenticator.authenticate(DefaultAuthenticator.java:32)
    at com.mongodb.connection.InternalStreamConnectionInitializer.authenticateAll(InternalStreamConnectionInitializer.java:109)
    at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:46)
    at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:108)
    at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:111)
    at java.lang.Thread.run(Thread.java:748)
Caused by: javax.security.sasl.SaslException: Unable to find PBKDF2WithHmacSHA1. [Caused by java.security.NoSuchAlgorithmException: PBKDF2WithHmacSHA1 SecretKeyFactory not available]
    at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.hi(ScramSha1Authenticator.java:229)
    at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.computeClientFinalMessage(ScramSha1Authenticator.java:166)
    at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.evaluateChallenge(ScramSha1Authenticator.java:99)
    at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:57)
    ... 9 more
Caused by: java.security.NoSuchAlgorithmException: PBKDF2WithHmacSHA1 SecretKeyFactory not available
    at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122)
    at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)
    at com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient.hi(ScramSha1Authenticator.java:226)
    ... 12 more

more

Any idea how I can quickly remedy the situation?

Thank you very much!