mongodb connection error

Tara Wilson (new) shared this question 4 years ago
Answered

Hello. I tried following the article https://community.yellowfinbi.com/knowledge-base/article/how-to-connect-to-mongodb-from-yellowfin to connect to a test mongo instance. When I follow the first set of instructions, I get the error, "javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?"

I used the following connection string:

jdbc:mysql://<our url>:27015/sample_airbnb?useLocalTransactionState=true

Is this something possibly related to the fact that I have unsecure/mixed content error on my YF instance at the moment? The certificate is valid.

Any help or direction would be appreciated!

Replies (8)

photo
1

Hi Tara,


Thank you for reaching out to us on this. Your mixed content error will need to be addressed on it's own (I will respond to your other request on this shortly). For your connection string, based on the article you have followed, I notice you are missing a few components. Using your string provided and looking at the article, I believe it should be:

jdbc:mysql://127.0.0.1:3307/test?useSSL=false&useLocalTransactionState=true &authenticationPlugins=org.mongodb.mongosql.auth.plugin.MongoSqlAuthenticationPlugin

If you have not tried this full string, please do so and let me know how this goes. If you run into further issues, please let me know and we can step through it.


Cheers,

Neal

photo
1

Thanks for responding. I tried the updated string but get another error:

java.lang.ClassNotFoundException: org.mongodb.mongosql.auth.plugin.MongoSqlAuthenticationPlugin
I currently have "mysql-connector-java-8.0.18.jar" listed under my system info so I skipped past the update as described and tried to connect.

photo
1

Hi Tara,


There may be two things happening here, so if you can complete step 1 below, then try to connect. If that doesn't work give step 2 a try and let me know how you go:

  1. Please download the mongodb_auth plugin (from this link) and place it Yellowfin/appserver/webapps/ROOT/WEB-INF/lib directory and restart Yellowfin
  2. If the above does not fix this issue, please download one of the earlier mysql drivers (found at this link) and remove the 8.0.18 jar file form your Yellowfin/appserver/webapps/ROOT/WEB-INF/lib directory and place the newly downloaded (but older) driver. Restart Yellowfin and modify the connection to use this driver instead

That error looks like either the Mongo Authentication Plugin is not installed, or there are issues in using the MySQL 8 driver with the plugin (even the Mongo Auth site references the older MySQL 5 drivers)

Cheers,

Neal

photo
1

Hi Tara,


Hope you are well. I wanted to check in and see if the information I provided earlier was able to help you resolve this issue? Was there anything else I could do to help here?


Cheers,

Neal

photo
1

Hi Tara,


I hope you are having a good week. I am touching base to see if you are still seeing this issue? Was there something else I can do to assist further?


Cheers,

Neal

photo
1

Hi Tara,


I hope things are going well over there.


Just wanted to let you know I'll be closing this request due to inactivity. However, if you ever wanted to re-visit this or have anything else I can help you with, please let me know.


Cheers,

Neal

photo
1

Hi Neal! Sorry, I got totally sidetracked on this. I've downgraded my driver and used the suggested connection string. I get the following message and I'm not sure if it's something that needs to be configured on the DB side or YF side:

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: recv handshake response error: this server is configured to only allow SSL connections
If I try to change ssl=true then it says:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?d
Does it matter that this is on an atlas cluster?

photo
1

Actually, found the problem it seems. It was an issue of different TLS versions on YF vs the cluster. Thanks for your help!

photo
1

Thanks Tara for the confirmation!

photo
Leave a Comment
 
Attach a file