Meteor: unexpected mongo exit code 100

MongodbPermissionsCentosMeteorSamba

Mongodb Problem Overview


I have just installed Meteor version 0.5.9 (45fef52095) to my CentOS release 6.3 (Final) server (Linux version 2.6.32-279.19.1.el6.i686 ([email protected]) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Dec 19 04:30:58 UTC 2012)

I have a samba share to a Windows SBS server mounted as /mnt/apshared under the apache user. I have created a directory inside this called 'webmeteor'. I have created an app called 'myapp' inside the 'webmeteor' directory, so my directory is like so: /mnt/apshared/webmeteor/myapp.

I am logged in as root. When I try to run the app using the meteor command, I am given the following error messages:

Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start mongod

MongoDB had an unspecified uncaught exception.
Check to make sure that MongoDB is able to write to its database directory.

My first point of call was this StackOverflow question: https://stackoverflow.com/questions/14496190/creating-a-new-meteor-js-file-and-get-error-100-mongodb-not-able-to-write -- however, following these suggestions (sudo'ing the meteor command, and checking for disk space of which I have 70GB free) has not worked. I am quite certain that these issues are permission related.

I have tried to chown recursively to root:root (as I am logged in as root), and chmod to 777 recursively also, but to no avail.

I am asking you, what should I try next, to allow my Meteor app to start?

Thanks in advance.

Mongodb Solutions


Solution 1 - Mongodb

Using meteor reset erases all the data from your database. If you're worried about this then navigate to your project folder.

cd /path/to/my/project

Here you need to erase the mongodb.lock file.

rm .meteor/local/db/mongodb.lock

Now you can run Meteor using the command,

meteor

Solution 2 - Mongodb

Removing this file and folder worked for me:

rm -rf .meteor/local/db/mongod.lock .meteor/local/db/journal/

Solution 3 - Mongodb

Mine was fixed in the end by running export LC_ALL=C. Found the error through the debugging steps suggested in this post: https://stackoverflow.com/a/15752736/1820510

Solution 4 - Mongodb

It looks like a temporary solution can be found by running meteor out of a directory that isn't in the mount. Mongodb doesn't seem to take too kindly to shares, so you'll need set up rsync to periodically copy the files from your share to the directory where meteor is running.

Source: https://stackoverflow.com/questions/10103830/problems-to-run-examples-in-meteor#comment17269454_10231719

Solution 5 - Mongodb

As suggested elsewhere, running meteor reset fixed the problem for me on OS X.

WARNING: meteor reset erases everything in your local database.

Solution 6 - Mongodb

This is what helped me.

  1. I deleted .meteor/local/db/mongod.lock
  2. I killed mongod process. You can find this using "ps -ef | grep mongo"

Solution 7 - Mongodb

Make sure you have enough free space on that partition. If not, you'll get this very error.

Solution 8 - Mongodb

I'm running meteor under Vagrant and came across this issue, before finding this thread I removed my MongoDB files from /var/lib/mongodb as there was a .lock in there as well, this might or might not have been required but worth a look for other areas where MongoDB might be residing beside the .meteor folder.

Solution 9 - Mongodb

this bug used to happen everytime I restarted meteor and

rm .meteor/local/db/mongod.lock

didn't work for me (i'm working on cloud9 online IDE)

I now do

rm .meteor/local/db/mongod.lock .meteor/local/db/local.*

and everything gets back to normal without erasing my database

Solution 10 - Mongodb

I had the same issue on Windows 8.1 x64 : 'Unexpected mongo exit code 100. Restarting.'. And 'meteor reset' or 'delete mongod.lock' didn't solve it. To display the error details when launching mongod, I added a proc.stdout.on function in the run-mongo.js file :

// Let's not actually start a process if we yielded (eg during
// findMongoAndKillItDead) and we decided to stop in the middle (eg, because
// we're in multiple mode and another process exited).
if (stopped) return;

proc = spawnMongod(mongod_path, port, dbPath, replSetName);

// added this 3 lines just to debug 'Unexpected mongo exit code 100. Restarting.'
proc.stdout.on('data', function (data) {
  console.log('stdout: ' + data);
});

Then i got the explicit error :

*********************************************************************
ERROR: dbpath (C:\Users\Pierre-André\Desktop\Pal\Meteor\simple-todos\.meteor\local\db) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************

The error indicates the db directory doesn't exist. However, it exists. The problem was that i have a special character in the path (accent é in my name). I move my meteor project folder to another place in the disk which the path is accent free, and the it worked fine.

Hope that'll help.

The run-mongo.js file is located in my pc at : C:\Users\Pierre-André\AppData\Local\.meteor\packages\meteor-tool\1.1.10\mt-os.windows.x86_32\tools\runners

Don't forget to delete the 3 lines after solving the issue, or you'll have a lot of console logs each time the project is loaded.

Solution 11 - Mongodb

I had my machine shutdown accidentally that led to the same problem. None of the option helped i.e deleting .lock file or running export LC_ALL=C etc.
I am on Ubuntu 15.04. I started mongo with --dbpath option pointing to myApp/.meteor/local/db and the mongo start up logs made it clear that mongo was attempting to restore the database from the journal/s in the journal folder. It was looking for local.1 file that did not exist.

So I tried mongo --recovery that further pointed that it won't work until I have the journal folder.
here's what I did

  1. Deleted the journal folder (moved it to another location - just in case)
  2. ran the mongo --recovery (not 100% sure if that actually did something)
  3. started meteor
    And it started without any glitch and guess what I had all my data as expected

Solution 12 - Mongodb

first

> $ rm .meteor/local/db/mongodb.lock

if this doesn't work

backup as you can

> .meteor/local/db/meteor*

and

> $ meteor reset

and restore

> .meteor/local/db/meteor*

Solution 13 - Mongodb

Solved! In my case deleting meteor/local/db/mongodb.lock and meteor reset fix the issue.

Thanks All!

Solution 14 - Mongodb

If you get a notification with something like

Local folder has run out of space

Try going to

cd .meteor/local/bundler-cache/

and deleting everything in that directory. Its a cache so it shouldnt affect too much. It seems to grow uncontrollably sometimes.

EDIT

Combining all the other answers try

rm -rf .meteor/local/db/mongod.lock .meteor/local/db/local.* .meteor/local/db/journal .meteor/local/bundler-cache/linker/

If this is still not working you might have to free up some space on your disk. Do so by checking via

free -m

or looking at your inodes and how much space is being used up via

df -h

Solution 15 - Mongodb

I stumbled on this issue when I first installed node and meteor in my new laptop (Windows 10). I did not made any changes in the default installations.

Meteor reset or removing files from .meteor/local/db did not work for me as I was creating new apps to run locally and the directory was empty. So, I could create them but they didn't run. Tried also to create apps with older meteor versions, failed also.

Solved in my case by changing directory to c:\

> cd c:
> > meteor create testApp

This directory worked also with preexisting apps that I transferred from my pc. I guess something to do with NFS filesytems, I am new in all this so if anyone can explain more about it I would love to learn more. It's already frustrating that I cannot use all possible directories to store my apps

Solution 16 - Mongodb

I had a similar issue. It was due to the fact that my project directory was part of my Dropbox and there was some conflicted files in the .meteor/local/db directory. Removing these solved the problem.

Solution 17 - Mongodb

I could recover the error by deleting the Local Mogo db lock.

Steps to remove the db lock :

  1. Navigate to your app directory(where you have Meteor application files)
  2. Remove file $ rm .meteor/local/db/mongod.lock

Error occurs if Meteor Application is still running in background. Db lock is not released by the running application or due to improper system/application shutdown and unavailable for second instance of same application. So take care to quit the application every time.

Solution 18 - Mongodb

I had the same problem, I solved it changing ownership of .meteor folder (where MongoDB lives)

cd path-to-meteor-app
sudo chown -R youruser:yourgruop .meteor

Hope to help someone!

Solution 19 - Mongodb

I was able to fix it by export of LC_ALL, I am using Ubuntu

> export LC_ALL="en_US.UTF-8"

Solution 20 - Mongodb

If you have installed Mongo globally, then be sure to delete all the prealloc files in the /db/journal folder.

For Ubuntu, the /db/ folder is normally located in /data so the full path is /data/db/journal. This might be different for other OS's.

Solution 21 - Mongodb

work for me: I moved the project to another directory, because I have Windows 8.1. I had the project in desktop directory, when change the project to C:\meteor\project

Solution 22 - Mongodb

I stumbled on this issue when I first installed node and meteor in my new laptop (Windows 10). I did not made any changes in the default installations.

Meteor reset or removing files from .meteor/local/db did not work for me as I was creating new apps to run locally and the directory was empty. So, I could create them but they didn't run. Tried also to create apps with older meteor versions, failed also.

Solved in my case by changing directory to c:\

cd c:\

meteor create testApp

This directory worked also with preexisting apps that I transferred from my pc. I guess something to do with NFS filesytems, I am new in all this so if anyone can explain more about it I would love to learn more. It's already frustrating that I cannot use all possible directories to store my apps

Solution 23 - Mongodb

I had this problem using Meteor 1.4 on Windows 10. However, I am developing the the same meteor application on an Ubuntu install. The problem for me was caused by differences in the way Mongo 3.2 is implemented on Windows and Ubuntu. My 64 bit Ubuntu install uses WiredTiger. However as it says in the Meteor documentation:

If you are using Windows or 32bit Linux, you can update your development
database to 3.2, however it will continue to use the MMAPv1 storage 
engine, as the 32bit MongoDB binary does not support WiredTiger.

Using meteor reset on Windows blew away the WiredTiger format database from Ubuntu, and then rebuilt it using the old MMAPV1 engine. This solved the exit code 100 error.

Solution 24 - Mongodb

For those using bash on Windows (Windows Subsystem for Linux/WSL), I found that creating the meteor app outside of the /mnt directory solves the problem.

When I install it in my workspace in /mnt/c/Workspace it failed everytime. But, once I install it in the home directory (~), it runs the first time. Here's the image.

Solution 25 - Mongodb

I have the same error and I solved it just changing the name of the directory compañeros for companeros ... I know it is an fault for beginners but I have to tell this to help people whit. C:\nube\MEGA\cursos\coursera\CursowebResposivaEjemplos\compañeros\meteor_portfolio_website doesn't work C:\nube\MEGA\cursos\coursera\CursowebResposivaEjemplos\companeros\meteor_portfolio_website work correctly.

Solution 26 - Mongodb

I fixed this issue by modifying the /usr/local/lib/meteor file.

Adding "export LC_ALL=C LANG=C" to this bash script


#!/usr/bin/env bash

export LC_ALL=C LANG=C

BUNDLE_VERSION=0.5.16


Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAaron CunningtonView Question on Stackoverflow
Solution 1 - MongodbPrashantView Answer on Stackoverflow
Solution 2 - MongodbgabrielstuffView Answer on Stackoverflow
Solution 3 - MongodbXivView Answer on Stackoverflow
Solution 4 - MongodbmmmeffView Answer on Stackoverflow
Solution 5 - MongodbJonatan LittkeView Answer on Stackoverflow
Solution 6 - MongodbNavanView Answer on Stackoverflow
Solution 7 - MongodbPaul SturmView Answer on Stackoverflow
Solution 8 - MongodbRobert ForbesView Answer on Stackoverflow
Solution 9 - MongodbHammerGuyView Answer on Stackoverflow
Solution 10 - MongodbpalView Answer on Stackoverflow
Solution 11 - MongodbarunView Answer on Stackoverflow
Solution 12 - MongodbDavidFMView Answer on Stackoverflow
Solution 13 - MongodbNezirView Answer on Stackoverflow
Solution 14 - MongodbLeonView Answer on Stackoverflow
Solution 15 - MongodbYorgos KakavasView Answer on Stackoverflow
Solution 16 - MongodbLuke CliftonView Answer on Stackoverflow
Solution 17 - MongodbSourabhView Answer on Stackoverflow
Solution 18 - MongodbAgus AriasView Answer on Stackoverflow
Solution 19 - MongodbAlex FernandezView Answer on Stackoverflow
Solution 20 - MongodbTimothy NyotaView Answer on Stackoverflow
Solution 21 - MongodbTigerSpirtView Answer on Stackoverflow
Solution 22 - MongodbYorgos KakavasView Answer on Stackoverflow
Solution 23 - MongodbcharlesdebView Answer on Stackoverflow
Solution 24 - MongodbYoshua ElmaryonoView Answer on Stackoverflow
Solution 25 - MongodbjavierView Answer on Stackoverflow
Solution 26 - MongodbN3RDPWRView Answer on Stackoverflow