Error connecting to MongDB Atlas from App Engine (node.js)

231 views
Skip to first unread message

Yezzer

unread,
Feb 2, 2021, 11:03:53 AM2/2/21
to Google App Engine
Hi,

I'm trying to connect to MongoDB Atlas from App Engine, but getting errors. I've whitelisted 0.0.0.0/0 on MongoDB Atlas as this is just a test project.

I can connect fine from my local node server. Any ideas as to what I can try?

MongoServerSelectionError: connection <monitor> to 35.224.187.131:27017 closed at Timeout._onTimeout (/app/node_modules/mongodb/lib/core/sdam/topology.js:438:30) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) { reason: TopologyDescription { type: 'ReplicaSetNoPrimary', setName: 'atlas-loe0la-shard-0', maxSetVersion: null, maxElectionId: null, servers: Map { 'cluster0-shard-00-00.pntaf.mongodb.net:27017' => [ServerDescription], 'cluster0-shard-00-01.pntaf.mongodb.net:27017' => [ServerDescription], 'cluster0-shard-00-02.pntaf.mongodb.net:27017' => [ServerDescription] }, stale: false, compatible: true, compatibilityError: null, logicalSessionTimeoutMinutes: 30, heartbeatFrequencyMS: 10000, localThresholdMS: 15, commonWireVersion: 9 } }

George (Cloud Platform Support)

unread,
Feb 2, 2021, 4:36:41 PM2/2/21
to Google App Engine
Hello Yezzer, 

If you think this is caused by errors on the GCP side, you are encouraged to rather open an issue in the Public Issue Tracker, as more details are needed to investigate, some of which are of a private nature. A publicly visible thread like this one is not suitable for such an investigation. 

There is a community tutorial "Hello World app - MongoDB Atlas and App Engine flexible environment with Node.js" that may serve as a good example. It is worthwhile going through it and verifying that you have set all details correctly. 

Reply all
Reply to author
Forward
0 new messages