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.

4
  • This is similar to stackoverflow.com/questions/10103830/…
    – Prashant
    Mar 25, 2013 at 8:30
  • 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 be
    – Tarang
    Mar 25, 2013 at 11:25
  • 1
    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 directory Mar 28, 2013 at 8:46
  • A full, feature-complete Meteor release is right around the corner for Windows!
    – mmmeff
    Mar 16, 2015 at 15:02

26 Answers 26

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

8
  • 2
    Unfortunately, meteor reset does not work. The project resets, but it still fails to start with the same error. Mar 28, 2013 at 8:38
  • 2
    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. Apr 4, 2013 at 10:07
  • 1
    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.
    – Eric Leroy
    May 28, 2013 at 13:51
  • 9
    For me the file was named mongod.lock, not mongodb.lock. Deleting it didn't fix the problem, but meteor reset did
    – user456584
    Aug 13, 2014 at 17:46
  • 10
    I had to also remove the .meteor/local/db/journal/j.* to get it to work
    – nupac
    Dec 28, 2015 at 3:18
43

Removing this file and folder worked for me:

rm -rf .meteor/local/db/mongod.lock .meteor/local/db/journal/
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. Jul 26, 2016 at 17:34
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://stackoverflow.com/a/15752736/1820510

4
  • Helped on CentOS! Thanks
    – Scholle
    Aug 19, 2014 at 10:40
  • Helped on Ubuntu 14 on a droplet at Digital Ocean Feb 24, 2015 at 19:55
  • THIS fixed it for me! Runnung Amazon AWS Ubuntu 12.04 LTS
    – Thomas
    Feb 25, 2015 at 23:20
  • 1
    What exactly does export LC_ALL=C do to fix the issues? Feb 28, 2016 at 20:55
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

3
  • Thanks for this. For now I'll look in to other options to access the files from a Windows machine. Apr 18, 2013 at 10:28
  • 1
    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.
    – Meirion
    Jun 13, 2013 at 11:05
  • would be pretty unelegant using rsync. just do a hard link from the shared folder to your meteor project. worked for me.
    – InsOp
    Sep 16, 2016 at 11:31
11

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

WARNING: meteor reset erases everything in your local database.

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"
2
  • 1
    killall mongod did it for me..thanks for the nudge
    – TimDog
    Sep 7, 2015 at 14:58
  • The first thing I tried was the comment above by TimDog: killall mongod. Worked like a champ; thanks TimDog.
    – SoEzPz
    Apr 12, 2016 at 19:36
5

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

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

0
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

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.

2
  • I was having this exact problem on Windows (C:\Users\Fernando García\Proyectos\...); this should be a Mongo bug... Mar 9, 2017 at 19:26
  • It's because of your user names being irregular characters.
    – insidesin
    Jul 15, 2018 at 9:24
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

1
  • 1
    I just did 1 (delete journal) and deleted mongod.lock. This worked for me. Apr 21, 2015 at 18:25
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*

1

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

Thanks All!

1
  • 2
    Be careful using this command. I didnt realize it WIPED MY DATABASE!
    – Leon
    Apr 12, 2016 at 22:56
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
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

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.

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.

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!

0

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

export LC_ALL="en_US.UTF-8"

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.

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

0
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

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.

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.

3
  • How did you use your drive in Windows then?
    – insidesin
    Jul 15, 2018 at 9:23
  • @insidesin 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.) Jul 16, 2018 at 9:47
  • 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 :(
    – insidesin
    Jul 17, 2018 at 0:48
-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.

-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


Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.