Version 2.2.0 causes "Can't start Mongo server.Unspecified unrecoverable error. Exit was not clean" error

I’ve upgraded from Meteor version 2.1.1 to 2.2.0 and I’m experiencing errors when trying to build the Windows and macOS versions using Meteor-Desktop.

Has anyone else experienced this problem?

The error shown is:

Can't start Mongo server.Unspecified unrecoverable error. Exit was not clean

The meteor.log file is showing the following:

Unexpected mongo exit code 14. Restarting.

Unexpected mongo exit code 14. Restarting.

Unexpected mongo exit code 14. Restarting.

Can't start Mongo server.
Unspecified unrecoverable error. Exit was not clean

Someone posted about corrupted data earlier. Might be a similar issue. Mongodb driver has been updated

We have the same error and it would be a big bummer if it requires us to purge the entire database

OK fixed it by downloading the 4.2 binaries, running mongod --dbpath .meteor/local/db and then connecting to run the command

db.adminCommand( { setFeatureCompatibilityVersion: "4.2"} )

Then I could start meteor again since 4.4 is compatible with 4.2 (but not 4.0 which is what I had in my local db)

A good tip btw is to run a local mongod of the same version as meteor has embedded against .meteor/local/db since it will show much better error messages

We’re on version 4.2.13. So that can’t be the problem.

The solution that worked for us is to delete the content of the db folder under the .meteor folder. That fixed it the MongoDb problem.

It build without any further problems but we have Linux and macOS users reporting problems with the app all of a sudden now.

When mongodb upgrade its version would be need to upgrade database.
An right method is to backup and restore database, in local environment can do:

  • start Meteor in early version and backup mongo database with: mongodump --forceTableScan -h --port 3001 -d meteor
  • update Meteor, delete “.meteor/local/db” directory, start meteor and then restore with: mongorestore -h --port 3001 ./dump/

In production need to do the same thing, backup and restore database.

1 Like

Worked great for me! This should be included in the release notes!

I have the same problem after updating from ‘2.1’
Why I do not find this folder “.meteor/local/db” on my mac?
Inside of “.meteor” I have just ‘users/john/.meteor/package-metadata’ and ‘…/packages’

1 Like

maybe you haven’t created any apps yet ?

1 Like

You are right! This .meteor folder is inside of the project. But I found .meteor folder another global place.
I solved it just be removing /db forlder, after starting meteor new compatible was created. I do not need to restore the previous database.
Thank you for your help! :slight_smile:

You don’t even need the binaries, just Git checkout your app to the previous Meteor version (2.1 or earlier), start up and run meteor mongo in a new terminal. Then execute the adminCommand and you’re golden. No need to dump/restore, just upgrade to Meteor 2.2 and run your app.

1 Like

I used your idea, and indeed it allowed me to update to 2.2. But I am not able to update to 2.3.