I have followed this guide to configure VPC peering between Mongo Atlas and Qovery. I have also updated my cluster so that it can pick up the changes I have made to my route table (as per the documentation)
I have also added an ingress SG rule to allow traffic on port 27017 in my cluster.
The problem is I still can’t connect to Mongo
/app/node_modules/mongoose/lib/connection.js:807
const serverSelectionError = new ServerSelectionError();
^
MongooseServerSelectionError: Server selection timed out after 30000 ms
at NativeConnection.Connection.openUri (/app/node_modules/mongoose/li
Ok it seems that you have made everything that was required. However, I know that DNS resolution across VPC peering is a common issue. Can you check that you have turned on this feature within your VPC? Here is the procedure:
In the navigation pane, choose Peering Connections.
Select the VPC peering connection, and choose Actions, Edit DNS Settings.
To ensure that queries from the peer VPC resolve to private IP addresses in your local VPC, choose the option to enable DNS resolution for queries from the peer VPC. This option is Requester DNS resolution or Accepter DNS resolution, depending on whether the VPC is the requester or accepter VPC.
If the peer VPC is in the same AWS account, you can enable DNS resolution for both VPCs in the peering connection.
Choose Save.
If the peer VPC is in a different AWS account or a different Region, the owner of the peer VPC must sign into the VPC console, perform steps 2 through 4, and choose Save.
Hi @itajenglish, @dugwa try to set up his MongoDB Atlas connection via VPC peering. No success so far. I know you did succeed in managing the connection to MongoDB Atlas via VPC peering recently. Can you explain how you make it works? And how did you get an internal host for your MongoDB connection string? Thank you
The Atlas DB was deployed in a separate region from my App.
So when initiating the VPC request from Atlas, you need to take that into consideration and ensure that you corrrectly specify the region where Atlas lives and also the region where your app lives.