[SOLVED] Meteor can't connect to Mongo Atlas hosted @AWS

Hi all,

I have an issue I can’t seem to resolve since a few days. We thought to give MongoDB Atlas a chance. We just set up an M0 instance to check out if it were easier on us then one managed by us.

I followed a pretty outdated manual to get it going, but cant get our staging environment to boot up. First tried it with 1.6, with latest patch release, then upgraded to 1.7 in hopes to resolve this, as it uses mongodb@3.x.x to drive. But no matter how I try it resolves in this error message:

MongoError: no valid replicaset members found
    at Timeout.<anonymous> (/hapi/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js:645:33)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

The URL scheme is copied straight out of mongoDB’s recommendations, but sanitized because of paranoia :slight_smile:


I’m already through several proposals for fixing this, without any luck. Also I can of course connect via mongo shell without any issues.

What I tried:

  • different meteor versions (1.6.0, and
  • raising timeouts eg.: connectTimeoutMS=60000&socketTimeoutMS=60000
  • removing retryWrite=true
  • using URL for driver 3.6 with mongodb+srv schema

Any advice is greatly appreciated!


The isse was cfs:gridfs is outdated for MongoDB 3.4 Atlas.

The solution was using meanware:gridfs. This is a fork updated for current Atlas version.

More info:

1 Like