[JAVA-4906] Client Side Field Level Encryption (CSFLE) unable to connect to mongocryptd on Linux Created: 08/Mar/23  Updated: 27/Oct/23  Resolved: 31/Mar/23

Status: Closed
Project: Java Driver
Component/s: Client Side Encryption
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Prasannavengadesan Santhanagopalan Assignee: Jeffrey Yemin
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Summary

we are trying to use Mongo DB CSFLE On Java. it works fine on our developer machine on windows. but, however it is not working when we deploy on Linux server. we are getting below error.

com.mongodb.MongoClientException: Exception in encryption library: Exception in encryption library: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27020, type=UNKNOWN, state=CONNECTING, exception=

{com.mongodb.MongoSocketOpenException: Exception opening socket}

, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","severity":"FAIL"}]}

Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

MongoDB Java driver : 4.7.1

MongoDB-Crypt : 1.6.1

MongoDB.Bson : 4.7.0

How to Reproduce

Error happens when we deploy on Liunx server. our base image is redhat/ubi8

FROM docker-frameworkimage-rel.prodlb.travp.net/redhat.io/ubi8/openjdk-8:1.14-3

Additional Background

FLE is working fine on developer machine on windows. problem is only with server.

FLE works fine on both windows and Linux on .NET core. problem is only on Java



 Comments   
Comment by PM Bot [ 31/Mar/23 ]

There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information.

Comment by PM Bot [ 16/Mar/23 ]

Hey psantha3@travelers.com, We need additional details to investigate the problem. If this is still an issue for you, please provide the requested information.

Comment by Jeffrey Yemin [ 08/Mar/23 ]

psantha3@travelers.com, the JAVA project is intended for reporting bugs or requesting features in the Java driver, not for general support, even if that support is related to the Java driver. It's possible that after some investigation, the dedicated support team will end up escalating the case to driver engineers, but often that is not necessary.

So generally we recommend all customers starting a support case first. You can include a link to this ticket in your case, so that they know that we've already been in contact.

Comment by Prasannavengadesan Santhanagopalan [ 08/Mar/23 ]

Are you saying, there is nothing you can do on this. I need to work with support team to figure out configuration issue ? please clarify.

Comment by Jeffrey Yemin [ 08/Mar/23 ]

When I log into Atlas now, I see a Get Help link in the top right. Under that is a Create New Case link.

Comment by Prasannavengadesan Santhanagopalan [ 08/Mar/23 ]

yes. we are using Atlas. please provide the link to chat with MongoDB Support representative.  we want to sort this out. we are trying to fix so hard. but, we could not. 

Comment by Jeffrey Yemin [ 08/Mar/23 ]

Hi there, thank you for reaching out. We test the Java driver extensively on Linux so my first suspicion is a configuration or environment issue rather than an obvious driver bug. Since that's more of a support issue, I wanted to give you some resources to get this question answered:

  • Our MongoDB support portal, located at support.mongodb.com
  • Our MongoDB community portal, located here
  • If you are an Atlas customer, you can also: Click the in-app chat icon in the lower right corner to chat with a MongoDB Support representative OR Click Support in the left-hand navigation to view Developer Resources.

Regards,
Jeff

Comment by Prasannavengadesan Santhanagopalan [ 08/Mar/23 ]

we have verified and made sure that MongoCryptd is available on the path. also we have tried starting MongoCrypd explicitly on docker file and also through Java code "Process process = runTime.exec(mongocryptdPath)". but, still the same error.

 

Generated at Thu Feb 08 09:03:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.