Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
jchen
Contributor III

need help with connection to MongoDB

Hi, Need some help.

I am getting exception error while trying to connect MongoDB using tMongoDBConnection component from Talend Open Studio for Big Data 7.2.1.

com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect

I was able to connect on the same machine via MongoDB Compass and NoSQLBooster.

Any troubleshooting tips would be appreciated.

Thanks,

Jun

Labels (2)
1 Solution

Accepted Solutions
jchen
Contributor III
Author

the issue was resolved. it was caused incorrect certificate. thank you for your help.

View solution in original post

14 Replies
Anonymous
Not applicable

Hello,

Are you trying to connect the MongoDB Atlas cluster?Did you provide the replica address for the cluster on the tMongoDBConnection component? We will appreciate it a lot if you could post your tMongoDBConnection component setting screenshots here.

Best regards

Sabrina

jchen
Contributor III
Author

Hi Sabrina,

 

Thank you for getting back to me. Attach is the setting for tMongoDBConnection.

 

Yes, I am trying to connect to MongoDB Atlas (4.2.11 Enterprise) on AWS.

 

Thanks,

Jun

 

Anonymous
Not applicable

Hello,

To connect to the Mongo DB Atlas (tMongoDBConnection component), please select the replica host and provide a list of replica hosts. Also, you no need to set the Keystore component as it is built-in on the mongo DB Atlas. please remove also key store component.

Let us know if it works.

Best regards

Sabrina

jchen
Contributor III
Author

Thanks, Sabrina.

 

I tried using Replica Host option (see attach) and still getting the same error.

 

Is a list of hosts required? I only put in one host.

 

Thanks,

Jun

 

 

 

jchen
Contributor III
Author

This is whole error message. Could it be that Common Name is not matching with the host?

 

Exception in component tMongoDBConnection_1 (Load_VFD)

com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. 

Client view of cluster state is {type=UNKNOWN, servers=[{address=xxxxx.xxxxxxxx.xxxxxxx.healthcareit.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 DNS name matching xxxxx.xxxxxxxx.xxxxxxx.healthcareit.net found.}, 

caused by {java.security.cert.CertificateException: No subject alternative DNS name matching xxxxx.xxxxxxxx.xxxxxxx.healthcareit.net found.}}]

 

Anonymous
Not applicable

Hello,

Does this exception come when run from the STUDIO to the local? Did you use any tsetkeystore when enable SSL connection?

Best regards

Sabrina

jchen
Contributor III
Author

No, it's not running from local. I am not using tsetkeystore when enable SSL.

 

Thanks,

Jun

jchen
Contributor III
Author

Hi Sabrina,

 

This is the option I used to connect to mongodb in Compass too. Do I need to use the tSetKeystore?

 

Thanks,

Jun

Anonymous
Not applicable

Hello,

Do you have the Certificate, Certificate Authority and Private key files to connect to MongoDB through Talend Using SSl Connection?

Let us know if this article is helpful for you in understanding the SSL certificate setup

https://unix.stackexchange.com/questions/347116/how-to-create-keystore-and-truststore-using-self-sig...

Best regards

Sabrina