MongoServerSelectionError after upgrading to Meteor 2.2

When upgrading to v2.2 from v2.1.2, this happens

accounts-base upgraded from 1.8.0 to 1.9.0
mongo upgraded from 1.10.1 to 1.11.0
npm-mongo upgraded from 3.8.1 to 3.9.0

The I start it up and get:

MongoServerSelectionError: Server selection timed out after 30000 ms

I tried with meteor reset and the buit in db, with a local MongoDb server and with cloudmongo, same problem everywhere.

If I downgrade to 2.1.2 it starts working again.

I’ve tried ?useUnifiedTopology=false&directConnection=true in all kind of combinations to no avail, as well as meteor reset

Anyone having an idea what’s happening?


1 Like

I suggest we try to determine whether there is something wrong with your mongo url. Would you please try this test DB I have just created in Mongo Atlas:

MONGO_URL: ‘mongodb+srv://’

I’ll try that, but when I change back to 2.1.2 it works, 2.2 (and above) does not. Each time I go back with a meteor update --release 2.1.2 it starts working again. 2.2. has some major changes:

v2.2, 2021-04-15
MongoDB Update to 4.4.4
Cordova Update to 10
Typescript Update to 4.2.2
New skeleton: meteor create myapp --svelte

But I figured that it should at the very least work with the built in db after a meteor reset

Anyways, thanks for the url - I will test it now.

" MongoDB version 4.4.4 is not recommended for production use due to critical issue WT-7995, fixed in later versions. Use the latest available patch release version."

Your url give the same problem. There’s a ‘cordova’ in the error messages and the release notes say it is updated to Cordova 10, but there’s no package cordova 10.0.0
I guess I am suppose to be able to add it with meteor add cordova@10.0.0 ?

MongoServerSelectionError: Server selection timed out after 30000 ms
(STDERR) at Timeout._onTimeout (/home/stefan/.meteor/packages/npm-mongo/.
W20220407-12:35:51.539(2)? (STDERR)

I wouldn’t bother with that cordova because it is just part of the name, those are basically all client bundles. Your problem is somewhere else I guess.

I am wondering if this could be related to 4.4.4 being maybe deprecated, I am not sure how Meteor gets that DB version upon version update.

Do you actually have a mongo running locally? Can you get the shell with

meteor mongo

And if you do, what is the version (in shell)


If you run local Meteor on port 3000, do you get anything on


Or on your Meteor port number + 1.

I’ve tried your db, my own cloud mongo, my local standalone install and the built in…

When I run the built-in db, it comes up at port 3001 and I can see it in my 3T Studio. The Db ‘meteor’ is also being created (after a meteor reset) and 3T reports version 4.4.4

I cannot run meteor shell though, since the app is crashing directly.

This is super annoying :slight_smile:

Worth to note is that it is an old project that I am trying to bring up from version 1.6
I have taken it upwards through minor versions, patiently wading through abandoned and obsolete packages, but it seems the journey stops at Meteor v 2.1.2

Oh well, it could’ve been worse :slight_smile:

Ok, If I were you, I’d delete the Meteor folder. I believe you are on Ubuntu, not sure where Meteor is in Ubuntu.
It happened to me in the past that after a Meteor update my Meteor was running with a mix of packages from multiple versions of Meteor. This is just to eliminate one more possibility.

Remove all Meteor stuff, install Meteor 2.2 (or 2.2.4) fresh, try a Meteor create app and see if all works ok, try your project again. Maybe try to use this also: Command Line | Meteor API Docs