[SOLVED] Meteor 1.7.0.3 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:


/hapi/programs/server/node_modules/fibers/future.js:313
						throw(ex);
 						^
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:

MONGO_URL=mongodb://user:<PASSWORD>@cluster-shard-00-00.mongodb.net:27017,cluster-shard-00-01.mongodb.net:27017,cluster-shard-00-02.mongodb.net:27017/test?ssl=true&replicaSet=cluster-shard-0&authSource=admin&retryWrites=true

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, 1.6.1.3 and 1.7.0.3)
  • 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!

Cheers,
Abel

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: