Updating to 1.7.1: Unexpected mongo exit code 62. Restarting

I’m getting this error and working on it via discussion on this github thread:

2 Likes

I’m solved this with next steps:
1.Mongodump
2. Meteor reset
3. Mongorestore

Hope this help

Check the 1.7 release notes:

NOTE: After upgrading an application to use Mongo 3.6.4, it has been observed (#9591) that attempting to run that application with an older version of Meteor (via meteor --release X), that uses an older version of Mongo, can prevent the application from starting. This can be fixed by either running meteor reset, or by repairing the Mongo database. To repair the database, find the mongod binary on your system that lines up with the Meteor release you’re jumping back to, and run mongod --dbpath your-apps-db --repair. For example:

~/.meteor/packages/meteor-tool/1.6.0_1/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod --dbpath /my-app/.meteor/local/db --repair

This sounds very similar to your issue. However, @orloff’s solution will also work if this is the problem.

3 Likes

see this solution: https://github.com/meteor/meteor/issues/9871#issuecomment-392897692

this does not wipe your entire database

1 Like

Solved! After meteor reset for some reason I was getting errors launching mongo. I removed mongo entirely from my dev system and re-installed it, then reloaded my mongo tables from backup files previously created.

Then I had to run the following in the terminal:

$ mongo --shell

…to launch the mongo shell. Then:

> db.adminCommand( { setFeatureCompatibilityVersion: “3.4” } )

…so that Meteor could connect to the latest mongo.

My Meteor app is now running in 1.7.1.

2 Likes

Just updated to Meteor 1.8, and got this error, but when I run

mongo --shell

I just got a bunch more errors that it can’t connect.

I tried @robfallows suggestion, and was able to successfully create a new meteor app and run it, but when I run Meteor on my app I updated to 1.8, I get the Unexpected mongo exit code 62. Restarting. error.

This is a pretty thorough reset for Meteor. It might be worth a try in your case.

  • Download an entirely fresh copy of your source via git clone
  • Copy the .meteor directory into the new project folder from the previous source folder
  • Run meteor reset and meteor update (Make sure to have copies of your mongodb files so as to upload them again to local mongo after the reset )
  • Uninstall Mongo from your local dev system and re-installed it
  • Run mongo --shell in the terminal to access the mongo shell
  • If your code expects Mongo 3.4, run db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } ) in Mongo shell
1 Like

It’s still an issue in 1.8, only now you need to set the db to 3.6, rather than 3.4. See here for details on how to fix this without meteor reset: https://github.com/meteor/meteor/issues/9871#issuecomment-416881052

3 Likes