What is the correct MONGO_URL setting for replica sets on Meteor 1.4.1.1

This morning I posted my updated Meteor project to Heroku.

I updated from 1.1.0.3to 1.4.1.1.

With Meteor Buildpack Horse everything was installed correctly, but the application crashed with an error;

MongoError: the seed list does not contain mongos proxies, for replicaset connections, the replicaSet parameter is required, which must be provided in the URI or options object, mongodb: // server: port / db? replicaSet = name

Mine MONGO_URLwas mongodb://u:p@url1:port,url2:port/db, so I changed it to;

mongodb://u:p@url1:port,url2:port/db?replicaSet=set-name

If I made a mistake with the replicaSet parameter, I would get this error:

MongoError: primary not found in replication

, replicaset , , , , .

, , .

URL-, Mongo, , , .

replicaSet, ?replicaSet=set\-name MongoError: no primary found in replicaset.

MongoDB, , Meteor/me!

+4
1

Meteor v1.4 MongoDB.

MONGO_URL , MONGO_OPLOG_URL, , replicaSet.

. GitHub ( Compose.io).

oplog:

Oplog meteor run MONGO_OPLOG_URL.

(...)

Meteor, MongoDB ; mongod oplog. Mongo sharding.

:

1.4, , MONGO_OPLOG_URL replicaSet (. oplog).

. - MongoDB , replicaSet. , Compose.io : MongoDB Classic MongoDB+. MongoDB + , ( , ), replicaSet, Meteor , .

+5

Source: https://habr.com/ru/post/1653568/


All Articles