Jump to content

MongoDB with Forge 1.8.9 - Solution to https://forums.minecraftforge.net/topic/122729-mongodb-connection-timeout-forge-189/


oShotz

Recommended Posts

I know 1.8.9 isn't technically supported on this forum, but I'm putting this information out there to help anyone else who ends up in the same boat I was. This post is a solution, not an issue.

While trying to use MongoDB with Forge, I was able to get my mod running fine from the IDE (using ".\gradlew runClient"), but after building the mod (using ".\gradlew build"), and running it through the normal Minecraft Launcher, I received the same set of errors seen in the linked post. Namely:

Error connecting to MongoDB: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@4fe9a720. \n Client view of cluster state is {type=REPLICA_SET, servers=[{address=ac-cpyryjh-shard-00-00.cnvpg2s.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address 18.197.37.129 found}, caused by {java.security.cert.CertificateException: No subject alternative names matching IP address 18.197.37.129 found}}, {address=ac-cpyryjh-shard-00-01.cnvpg2s.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address 18.195.134.220 found}, caused by {java.security.cert.CertificateException: No subject alternative names matching IP address 18.195.134.220 found}}, {address=ac-cpyryjh-shard-00-02.cnvpg2s.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address 52.28.222.2 found}, caused by {java.security.cert.CertificateException: No subject alternative names matching IP address 52.28.222.2 found}}

I figured out how to resolve this, however. The Minecraft Launcher uses an old version of Java for whatever reason, meaning you need to force it to use the same JDK as the one you use in development. Follow the steps here: https://minecrafthopper.net/help/guides/changing-java-version/ to do so. You'll want to point the launcher to the "javaw.exe" file located within the 1.8 JDK folder.

Hopefully this saves someone 3 hours of Googling, took me ages to figure out what the issue was. Lesson learned; don't assume Minecraft is using the latest version of Java.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.