- Newest
- Most votes
- Most comments
It seems you're experiencing connection issues with your Amazon DocumentDB cluster running engine version 3.6.0. There are several potential reasons for this and steps you can take to troubleshoot:
-
Security Group Configuration: Ensure that the security group associated with your DocumentDB cluster allows inbound traffic on port 27017 from your client's IP address or security group.
-
Network Configuration: Verify that your client (EC2 instance, local machine, etc.) is in the same VPC as the DocumentDB cluster, or that you have proper VPC peering or VPN setup if connecting from outside the VPC.
-
Endpoint Validity: Double-check that you're using the correct cluster endpoint. You can obtain the correct endpoint using the AWS CLI or the AWS Management Console.
-
TLS Configuration: DocumentDB requires TLS by default. Make sure you're using the correct CA certificate (global-bundle.pem) and that TLS is enabled in your connection string.
-
Authentication: Verify that you're using the correct username and password.
-
Connection String: Ensure your connection string is properly formatted. For DocumentDB 3.6.0, it should look something like this: mongodb://username:password@your-cluster-endpoint:27017/admin?ssl=true&replicaSet=rs0&readPreference=secondaryPreferred
-
Cluster Status: Check if the DocumentDB cluster is in the "available" state in the AWS console.
-
IAM Authentication: If you're using IAM authentication, make sure your IAM policies are correctly set up.
-
Client Tools: Ensure you're using compatible versions of your client tools (mongosh, MongoDB Compass) with DocumentDB 3.6.0.
-
Firewall/Network Issues: Check for any firewall rules or network issues that might be blocking the connection.
If you've verified all these points and are still experiencing issues, you may need to contact AWS support for further assistance. They can help investigate any potential issues with the cluster itself or provide more detailed troubleshooting steps based on your specific setup.
Regarding your attempt to restore a snapshot and run a new cluster, if the issue persists, it suggests that the problem might be related to your network configuration or client setup rather than the cluster itself. Double-check your VPC, subnet, and security group configurations for the new cluster as well.
Sources
Connection issues - Amazon DocumentDB
connecting to a documentDB instance using mongoSH | AWS re:Post
Connect Amazon EC2 manually - Amazon DocumentDB
Relevant content
asked a year ago
asked 9 months ago
asked a year ago
- AWS OFFICIALUpdated 10 months ago
