There is a problem with the driver of mongodb

There is a problem with the driver of mongodb. During the execution

process, reading information fails and the connection times out.

The screenshot is as follows, how to solve this problem, thank you for your answer.

Hello @643194378 ,

Welcome to The MongoDB Community Forums! :wave:

To understand your use-case better, can you please provide additional details such as:

  • Was this working before or you are getting this error on first try?
  • MongoDB Version
  • Driver and Driver version
  • Are you trying to connect to MongoDB Atlas or your local server?
  • Can you try connecting to your MongoDB Database from shell or compass?

Regards,
Tarun

Hi Tarun
This is the first error encountered,
Version 4.0.26, driver java 3.6.3,
I’m not connected to MongoDB Atlas or a local server, but with the same configuration, Alibaba Cloud has no driver and connection timeout issues.
Can connect to my MongoDB database from the shell
How to solve this problem, thank you, looking forward to your reply.

Can you please clarify where the MongoDB server returning the error is located? I would like to confirm since you have stated Alibaba Cloud has no issues or timeout issues.
What is the deployment topology? (Standalone, replica set or any other)

As you mentioned you are able to connect to this deployment via shell, can you please try the same read query from this shell and see if you are able to get the required results? This may assist with narrowing down the possible causes of the error.

If this is the first time you are seeing this error, has anything changed in your deployment due to which this query started giving read timeouts?