I have gotten the sample code here mongodb-university/docs-in-use-encryption-examples/blob/main/queryable-encryption/go/local/reader to run on macOS (using libmongocrypt installed with brew, and the shared_lib). No issues there.
I’m now trying to run the same code in an amd64/debian:bullseye container connecting to an atlas cluster (M10, version 6.0.4).
@danny_fry The issue seems to be that the Go application is hanging when it reaches a certain line of code while trying to connect to an Atlas cluster. The last line that runs successfully has been identified, but no error or output is being returned.
Some possible issues could be:
Incorrect authentication credentials or network settings. It is important to ensure the Go application is using the correct Atlas connection string and database user credentials.
Firewall or network issues preventing the Go application from establishing a connection to the Atlas cluster. It may be helpful to check if there are any special network or firewall rules that need to be set.
Compatibility issues with the Atlas cluster or MongoDB driver. It may be helpful to check if the version of the MongoDB driver being used in the Go application is compatible with the version of the Atlas cluster being used.
Some suggested methods to debug the issue could be:
Adding print statements at various points in the code, to verify which lines of code are being executed and which ones are hanging.
Checking the MongoDB server logs to see if there are any relevant error messages or status codes that could indicate what the issue is.
Using a tool such as Wireshark to inspect the network traffic and see if the Go application is able to establish a connection to the Atlas cluster.
Trying to run the same Go application on a different machine or environment to see if the issue is specific to the current environment.