IBM Cloud Docs
Why can’t I connect to my MongoDB deployment?

Why can’t I connect to my MongoDB deployment?

If you encounter errors when connecting to your IBM Cloud® Databases for MongoDB deployment, review these common causes and resolutions.

You receive an error message or fail to connect to a Databases for MongoDB deployment. If reviewing application logs, you might see errors that mention intermittent connection timeouts or unable to connect.

  • An unsecured connection is a common cause of connectivity errors. All Databases for MongoDB connections use TLS/SSL encryption; Databases for MongoDB rejects unsecured connections. To avoid errors, make sure you configured a secure connection. Refer to Getting Started for an example of a secure connection.
  • If you are using a private endpoint, make sure that you specify connection strings that contain the private endpoint (see Credentials for Private Endpoints) and that you follow the steps in Connecting through Private Endpoints.
  • If your application log captures a short connection interruption, that behavior is expected as a normal part of operations for this managed service. You want to design your applications to retry connections when errors are caused by a temporary loss in connectivity to your deployment or to IBM Cloud®. However, if you experience several minutes of connection interruption check the Cloud Status for the service. For more information, see Application-level high availability.