Run-rs package not working with Meteor 2.6.x and higher

It seems the changes to MongoDb in version 2.6 have also broken the run-rs package (see run-rs - npm), which is simulating the replica set behavior of 3 nodes that you have in your MongoDb production environment (hopefully), especially on Atlas.

The problem seems to be the upgrade of npm-mongo package from version 3.9.1 to 4.3.1 as this issue on the git indicates that any version above 4.2 won’t work anymore:

this is because mongo is no longer (after 4.2) echoing a message to stdout that mongodb-topology-manager requires

Source: Unable to start or create replica set with mongodb 4.4.1 · Issue #57 · vkarpov15/run-rs · GitHub

Am I the only one who has this problem? It means that with the current version 2.7.3 I can’t use the replica set in Dev environment.

Seems like this is not an issue that needs to be solved in meteor. It must be solved in the npm package that you are using

Hmh, what makes you come to this conclusion? So it’s ok to just upgrade the MongoDb driver in Meteor and not care about many problems in npm packages or apps?

I still don’t understand why this was pushed/necessary, I guess it’s also ok that I will just continue to be stuck on version 2.5.8 forever.

So you mean, you want upgrades to be stuck and stop using upgraded versions of packages being used by meteor just because one of the tools that you are using, which is not even being used by meteor, is not working on the upgraded packages?


1 Like

Also, check if you are referring to mongodb version or mongodb DRIVER version

No, like I wrote I want to understand why this was pushed/necessary?

You’re also affected by this, if I recall correctly, as you have used raw collections or Transactions in your app. Correct?

Using the raw mongodb driver does not require the use of replicas.

And again, check if you are referring to Mongodb (the database) version or the DRIVER version. You seem to be mixing the two

I agree with @rjdavid that this is not a Meteor problem. This is a 3rd party package, that does not work with MongoDB 4.4 (released about two years ago).

However, my question is: why were you using it in the first place? Meteor sets up a single-node replica set automatically, so all of the replica set-specific features (e.g., change streams) just work. And if you need more control (e.g., configure the database itself, or add more nodes), you can set it up without this package. (I prefer Docker for that, but there’s a plenty of options out there.)

That doesn’t simulate the change of nodes (electing a new primary node). Been using this package for the last 6 years.

It’s also very good as one app uses two different databases which works just fine with MongoDb 4.2

But irregardless, upgrading MongoDb has brought many problems to those of us that are using raw collections and transactions, as mentioned in other threads already. The reason why we had to use raw collections in the first place is that MDG neglected the project for years and didn’t upgrade Meteor to allow us to use transactions which is vital at least for my apps.

Now changing over one thousand code blocks isn’t possible, at least not for a small one-man company like me. Hence I’m stuck at version 2.5.8.

But I still didn’t get an explanation/reason as to why MongoDb was updated with those breaking changes (for us).

The one from Meteor doesn’t, but you can set up as many nodes as you want using Docker.

But who stops you from using MongoDB 4.2? The driver itself is compatible with all versions from 3.6 to 5.0.

But… What could they do? I mean, literally everyone using the MongoDB driver in most languages had to use the API we call “raw collection API”. Meteor only provided a thin layer on top of some of them.

Like everyone else using the driver directly. And that includes everyone using the MEAN/MERN/MEVN stack, which is a lot.

What kind of answer do you expect? I don’t have the exact numbers, but I’m pretty sure far more people are interested in the features added in newer MongoDB versions rather than sticking to 4.2 (released in March 2020) forever.

And updating the driver was needed for a lot of people in small teams, using the free Atlas tier, as they have been forced to use MongoDB 5.0 for a while now.

1 Like

Good point with the versions :+1:t3:

I expected this, thanks for bringing this back to my memory. The free tier change from MongoDb Atlas was the driving force behind.

My team is as small as 1 person (meaning, it’s just me) and I can afford to pay for a M10 tier BTW. But yeah, supporting Software companies isn’t so popular when “free” is available.

I’m using 4.2.6 already. If there would be a Homebrew version for 4.2.21 I’d have upgraded to that one. 4.4 breaks things, not 4.2