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 (mockbuild@c6b8.bsys.dev.centos.org) (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.

Community
  • 1
  • 1
Aaron Cunnington
  • 1,631
  • 2
  • 15
  • 23
  • This is similar to http://stackoverflow.com/questions/10103830/problems-to-run-examples-in-meteor – Prashant Mar 25 '13 at 08: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 '13 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` – Aaron Cunnington Mar 28 '13 at 08:46
  • A full, feature-complete Meteor release is right around the corner for Windows! – mmmeff Mar 16 '15 at 15:02

26 Answers26

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

Prashant
  • 1,825
  • 1
  • 15
  • 18
43

Removing this file and folder worked for me:

rm -rf .meteor/local/db/mongod.lock .meteor/local/db/journal/
cela
  • 2,352
  • 3
  • 21
  • 43
gabrielstuff
  • 1,286
  • 1
  • 13
  • 16
  • 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. – Jason Cramer Jul 26 '16 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

Community
  • 1
  • 1
Xiv
  • 8,862
  • 3
  • 27
  • 30
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

Community
  • 1
  • 1
mmmeff
  • 1,025
  • 9
  • 20
  • Thanks for this. For now I'll look in to other options to access the files from a Windows machine. – Aaron Cunnington Apr 18 '13 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](https://github.com/pixelhandler/vagrant-dev-env#readme) under **Build the meteor example todos app**. I tried using [lysnc](http://manpages.ubuntu.com/manpages/natty/man1/lsyncd.1.html) to keep the auto-reload working, but had problems so have to resort to using `touch ` each time I make a code change from Windows to trigger lysnc. – Meirion Jun 13 '13 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 '16 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.

colllin
  • 9,442
  • 9
  • 49
  • 65
Jonatan Littke
  • 5,583
  • 3
  • 38
  • 40
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"
Navan
  • 4,407
  • 1
  • 24
  • 26
5

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

Paul Sturm
  • 2,118
  • 1
  • 18
  • 23
  • That was my problem. Figured it after seeing this: http://stackoverflow.com/a/15752736/1820510. `mongod` says the following: "Please make at least 844MB available in ./journal or use --smallfiles" – agentofuser Jan 17 '15 at 12:22
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.

cela
  • 2,352
  • 3
  • 21
  • 43
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

HammerGuy
  • 101
  • 8
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.

pal
  • 21
  • 2
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

arun
  • 11
  • 2
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*

DavidFM
  • 193
  • 7
1

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

Thanks All!

Nezir
  • 6,727
  • 12
  • 54
  • 78
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
Leon
  • 5,701
  • 3
  • 38
  • 38
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

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

Luke Clifton
  • 81
  • 1
  • 8
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.

Sourabh
  • 413
  • 5
  • 17
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!

Agus Arias
  • 467
  • 1
  • 7
  • 5
0

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

export LC_ALL="en_US.UTF-8"

Alex Fernandez
  • 1,892
  • 14
  • 17
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

Charlie
  • 8,530
  • 2
  • 55
  • 53
TigerSpirt
  • 161
  • 1
  • 12
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.

charlesdeb
  • 571
  • 5
  • 14
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.

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

javier
  • 36
  • 6
-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