Meteor: unexpected mongo exit code 100
Asked Answered
S

26

55

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: 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.

Slifka answered 25/3, 2013 at 8:20 Comment(4)
This is similar to #10104330Ferreira
You might also want to try and startup the database at ./meteor/local/db manually with mongod so you get more verbosity & description on what problem may beHostler
After running /usr/lib/meteor/mongodb/bin/mongod --dbpath /mnt/apshared/webmeteor/myapp/.meteor/local/db/ it certainly does give a lot of information. The error is exception in initAndListen: 13651 Couldn't fsync directorySlifka
A full, feature-complete Meteor release is right around the corner for Windows!Hit
H
14

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: Problems to run examples in Meteor

Hit answered 17/4, 2013 at 3:40 Comment(3)
Thanks for this. For now I'll look in to other options to access the files from a Windows machine.Slifka
I'm using a Vagrant VM on Windows, originally with no problems at all. I set up a new meteor project which now has the Unexpected mongo exit code 100. Restarting. error. My previous meteor projects still work fine. I followed the instructions here under Build the meteor example todos app. I tried using lysnc to keep the auto-reload working, but had problems so have to resort to using touch <file> each time I make a code change from Windows to trigger lysnc.Axillary
would be pretty unelegant using rsync. just do a hard link from the shared folder to your meteor project. worked for me.Accumbent
F
88

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

Ferreira answered 25/3, 2013 at 8:33 Comment(8)
Unfortunately, meteor reset does not work. The project resets, but it still fails to start with the same error.Slifka
Did you try erasing mongodb.lock?Ferreira
After removing mongodb.lock the problem persists. I have found that running it outside of the mounted drive works fine. I think I will just do this.Slifka
I'm seeing this issue in a mounted drive as well. I'll post back if I manage to find a solution.Hit
thank you. I copied an app to another app and experienced this problem. Deleting the lock file worked. I wish the error would just say that. instead of Unexpected mongo exit code 100. Restarting.Hallucination
For me the file was named mongod.lock, not mongodb.lock. Deleting it didn't fix the problem, but meteor reset didDona
In some cases you'll also need to delete/move the journal folder.Suffruticose
I had to also remove the .meteor/local/db/journal/j.* to get it to workArun
M
43

Removing this file and folder worked for me:

rm -rf .meteor/local/db/mongod.lock .meteor/local/db/journal/
Mensal answered 13/9, 2015 at 19:44 Comment(1)
Yeah - same here. I had copied the project from Cloud 9 to my local computer and it was fixed by doing this. Thanks a lot.Fai
B
16

Mine was fixed in the end by running export LC_ALL=C. Found the error through the debugging steps suggested in this post: https://mcmap.net/q/433172/-problems-to-run-examples-in-meteor

Baptistery answered 31/3, 2014 at 21:51 Comment(3)
Helped on Ubuntu 14 on a droplet at Digital OceanTaproom
THIS fixed it for me! Runnung Amazon AWS Ubuntu 12.04 LTSBrocatel
What exactly does export LC_ALL=C do to fix the issues?Bluebottle
H
14

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: Problems to run examples in Meteor

Hit answered 17/4, 2013 at 3:40 Comment(3)
Thanks for this. For now I'll look in to other options to access the files from a Windows machine.Slifka
I'm using a Vagrant VM on Windows, originally with no problems at all. I set up a new meteor project which now has the Unexpected mongo exit code 100. Restarting. error. My previous meteor projects still work fine. I followed the instructions here under Build the meteor example todos app. I tried using lysnc to keep the auto-reload working, but had problems so have to resort to using touch <file> each time I make a code change from Windows to trigger lysnc.Axillary
would be pretty unelegant using rsync. just do a hard link from the shared folder to your meteor project. worked for me.Accumbent
I
11

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

WARNING: meteor reset erases everything in your local database.

Intercessor answered 3/3, 2014 at 11:58 Comment(0)
B
5

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"
Breastplate answered 14/2, 2014 at 4:34 Comment(2)
killall mongod did it for me..thanks for the nudgeArcherfish
The first thing I tried was the comment above by TimDog: killall mongod. Worked like a champ; thanks TimDog.Nata
U
5

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

Unmake answered 3/7, 2014 at 21:43 Comment(1)
That was my problem. Figured it after seeing this: https://mcmap.net/q/433172/-problems-to-run-examples-in-meteor. mongod says the following: "Please make at least 844MB available in ./journal or use --smallfiles"Dutton
G
3

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.

Goldin answered 13/7, 2013 at 12:28 Comment(0)
H
2

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

Hamlani answered 17/10, 2014 at 15:47 Comment(0)
G
2

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.

Gules answered 11/11, 2015 at 12:47 Comment(2)
I was having this exact problem on Windows (C:\Users\Fernando García\Proyectos\...); this should be a Mongo bug...Neogene
It's because of your user names being irregular characters.Furtive
P
1

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

Peaslee answered 12/4, 2015 at 14:34 Comment(1)
I just did 1 (delete journal) and deleted mongod.lock. This worked for me.Ive
N
1

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*

Nawrocki answered 17/4, 2015 at 6:21 Comment(0)
I
1

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

Thanks All!

Islamite answered 4/4, 2016 at 11:4 Comment(1)
Be careful using this command. I didnt realize it WIPED MY DATABASE!Weathersby
W
1

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
Weathersby answered 15/4, 2016 at 18:46 Comment(0)
H
1

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

Hooked answered 26/6, 2016 at 17:4 Comment(0)
G
0

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.

Gorga answered 17/9, 2014 at 20:8 Comment(0)
G
0

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.

Greenish answered 13/2, 2015 at 19:9 Comment(0)
D
0

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!

Dagny answered 19/3, 2015 at 14:18 Comment(0)
I
0

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

export LC_ALL="en_US.UTF-8"

Indiscrimination answered 5/8, 2015 at 13:21 Comment(0)
T
0

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.

Tokoloshe answered 6/4, 2016 at 6:26 Comment(0)
S
0

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

Situation answered 30/5, 2016 at 21:55 Comment(0)
H
0

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

Hooked answered 26/6, 2016 at 17:9 Comment(0)
D
0

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.

Dichotomy answered 31/8, 2016 at 18:48 Comment(0)
L
0

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.

Latricelatricia answered 10/10, 2017 at 12:52 Comment(3)
How did you use your drive in Windows then?Furtive
@Furtive I've given up on making it work on WSL. It's more time efficient to just install my whole stack in Windows directly (meteor, mongodb, etc.)Latricelatricia
Did you symlink the files you want to edit in Windows? How did that fail? I might be going down the same path as you :(Furtive
C
-1

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.

Columniation answered 7/5, 2016 at 20:58 Comment(0)
L
-1

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


Loculus answered 12/5, 2016 at 2:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.