Open geekgonecrazy opened 5 years ago
same here after updating from 0.71.1 to 0.72
After updating from 0.71.1 to 0.72 Rocket.Chat does not start anymore
systemd[1]: Started Rocket.Chat Server running at port 3001.
RocketChat[20060]: /srv/rocketchat-program/rocket.chat-0.72.0/programs/server/node_modules/fibers/future.js:313
RocketChat[20060]: throw(ex);
RocketChat[20060]: ^
RocketChat[20060]: MongoError: no primary found in replicaset or invalid replica set name
RocketChat[20060]: at /srv/rocketchat-program/rocket.chat-0.72.0/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/replset.js:636:11
RocketChat[20060]: at Server.<anonymous> (/srv/rocketchat-program/rocket.chat-0.72.0/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/replset.js:357:9)
RocketChat[20060]: at Object.onceWrapper (events.js:315:30)
RocketChat[20060]: at emitOne (events.js:116:13)
RocketChat[20060]: at Server.emit (events.js:211:7)
Unfortunately I’m not sure of a work around :(. Safest bet is to stay on 0.71.1 and wait until meteor fixes and we in turn can release a patch :(
Guys, your own documentation suggests using a number for the replicaset name https://rocket.chat/docs/installation/manual-installation/mongo-replicas/
We would all appreciate a word of warning somewhere on the release page, every time I plan on upgrading our instance I have to trawl through dozens of reports to find a potential blocker like this one, not cool.
@TomaszDom We've updated the documentation to use the replicaset we normally recommend using. Also have added to release notes. Hopefully the upstream release happens soon so we can release a fix. Thanks for your patience!
Is this repaired in 0.72.1 allready?
It is not. Apparently we are the only meteor project that had users create starting with a number. As soon as they do we'll try to cut a release. At the very least hopefully its fixed by 0.73.0
@rodrigok @sampaiodiego do either of you know if we can update the mongo library in just our project? Or would that have too many unknown consequences?
@geekgonecrazy that is a good question. I asked the meteor developer again, lets see.
Looking at how meteor development cycles go, I think we have a few months without upgrades to go.
For any of those here experiencing it feel free to thumbs up the meteor issue. Maybe we can make a bit of noise and get it to happen a bit quicker.
@geekgonecrazy would you consider the suggestion by @sebakerckhof in that report?
As I mentioned above the concern is it may have unknown consequences. The mongo driver and the meteor collections and other things are pretty directly related. Definitely not something we would want to jump to.
Is it possible to rename RC's replicaset name 001-rs safely?
https://stackoverflow.com/a/33400608 this might be of use. Note I have not tried... I would make sure to backup before doing it in any case.
If its a single node mongo cluster... it might be easier to do a backup. Wipe the mongo db re-initialize with new replicaset name... and then re-import your data.
FWIW, I decided to change the replicaset name according to that solution and it worked fine, then upgraded from 0.69.x to 0.73.2 without issues.
Just fyi: The ReplicaSet renaming worked for me, too.
I'm using 1.1.1 and the problem still happens. One option to temporarily solve this problem is change the replica set name before update your version.
I had this issue in a docker container setup, with one mongodb container and one rocketchat.
It was the name of the replication set member that was not getting updated (it was set to the name of the container when mongodb was created). Changing it to the name of the current container fixed the issue, but this needs to be done any time you update the container which seems like a bad idea. Don't know what the best solution here would be, as it's not really a rocketchat problem but a mongodb problem?
cfg = rs.conf()
cfg.members[0]["host"] = "[insert_correct_hostname_or_ip]:27017"
rs.reconfig(cfg)
If your mongodb instance does not say "PRIMARY" when logging into it, you might need to run the last command as: rs.reconfig(cfg, {force: true})
And of course back up your data before trying this out.
try to run sudo mongo --eval 'rs.initiate();'
Rocket.Chat 0.72.0 uses Meteor 1.8 which introduces the issue.
Example of connection string:
More details here: https://github.com/meteor/meteor/issues/10362