Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to connect to my cluster in MongoDB Atlas with java driver. However I am not able.
I was using version mongo-java-driver-3.8.0
I am getting the next error
Connection failed!
org.talend.repository.nosql.exceptions.NoSQLServerException: Cannot connect to database!
at org.talend.repository.nosql.db.util.mongodb.MongoDBConnectionUtil.checkConnection(MongoDBConnectionUtil.java:86)
at org.talend.repository.nosql.db.provider.mongodb.MongoDBMetadataProvider.checkConnection(MongoDBMetadataProvider.java:156)
at org.talend.repository.nosql.ui.common.AbstractNoSQLConnForm$1$1.run(AbstractNoSQLConnForm.java:157)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.talend.repository.nosql.exceptions.NoSQLReflectionException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect.
Client view of cluster state is {type=UNKNOWN, servers=[{address=mongodb+srv://test:jcvqks@pepecluster.f3dis.mongodb.net/test?retrywrites=true&w=majority:27017,
type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: mongodb+srv://test:jcvqks@pepecluster.f3dis.mongodb.net/test?retrywrites=true&w=majority},
caused by {java.net.UnknownHostException: mongodb+srv://test:jcvqks@pepecluster.f3dis.mongodb.net/test?retrywrites=true&w=majority}}]
at org.talend.repository.nosql.reflection.NoSQLReflection$WrapException.wrap(NoSQLReflection.java:97)
at org.talend.repository.nosql.reflection.NoSQLReflection.invokeMethod(NoSQLReflection.java:68)
at org.talend.repository.nosql.reflection.NoSQLReflection.invokeMethod(NoSQLReflection.java:53)
at org.talend.repository.nosql.db.util.mongodb.MongoDBConnectionUtil.checkConnection(MongoDBConnectionUtil.java:80)
... 3 more
Already check the name of the cluster and its correct.
Also can conected successfully with MongoDB Compass.
Can someone helps me, I am totally blocked.
Thanks in advance
Regards.