15

I am using a fresh Linux install. I am trying to install Meteor. Using Ubuntu 12.04, Centos and Ubuntu 13.04. I installed Node.js, Meteor and Meteorite.

Error:

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.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. MongoDB does
not support filesystems like NFS that do not allow file locking.

I've tried:

Deleting .meteor/local/db/mongod.lock Also I tried to change the permissions for the whole project with chmod.

Do you recommend any Ubuntu distribution?

Thanks in advance.

BuZZ-dEE
  • 6,075
  • 12
  • 66
  • 96
Daniel Rojas
  • 407
  • 2
  • 5
  • 16
  • Did any of the answers below solve your problem? or did you find an alternative solution that did? I'm having this issue running Ubuntu inside Vagrant/VirtualBox. :-( – nelsonic Sep 21 '14 at 14:42

14 Answers14

30

I have run in this problem before (after meteor update or abnormal meteor termination) and these solutions worked for me before.

  1. Restart your machine.
  2. Delete the file .meteor/local/db/mongod.lock and run meteor again.
  3. Execute meteor reset and start again, but this command will erase your database.

Hope it helps.

Oscar Saraza
  • 1,171
  • 1
  • 14
  • 23
16

It some time depends on your locale settings.

Meteor reset and delete mongod.lock didn't help in my case.

I've fixed it by running

export LC_ALL=C

you can add this line to

sudo vim /usr/local/bin/meteor
BuZZ-dEE
  • 6,075
  • 12
  • 66
  • 96
ivan133
  • 817
  • 1
  • 11
  • 22
  • Do you need to restart for it to work? Can you explain what the line does? – timebandit Jul 27 '16 at 16:59
  • LC_ALL is the environment variable that overrides all the other localization settings read more here: http://unix.stackexchange.com/questions/87745/what-does-lc-all-c-do Yes, you need to restart meteor application to apply this changes. I want to point that this is rather old question (and answer) and versions of meteor and ubuntu have increased since then so I don't know if it is still an actual problem. – ivan133 Jul 28 '16 at 05:05
5

All I had to do was run "killall mongod" in the terminal. After that it worked again. I believe it may have cleared parts of the database though.

Magnus Buvarp
  • 976
  • 7
  • 19
3

For me a combination of the suggestions worked out. The answer that has gotten 2 down votes! and this one from another page.

sudo vim /usr/local/bin/meteor
export LC_ALL="en_US.UTF-8"

then make sure which port your mongodb is running at by issuing the following:

meteor mongo

You will get a response like this:

connecting to: 127.0.0.1:3001/meteor

now that you know the port on which the mongo is configured, add the following to the same file we have been editing:

export MONGO_URL=mongodb://127.0.0.1:3001/meteor

Now you are good to go. Of course "meteor reset" works but if you dont want to loose your data, stick with those two export lines.

Community
  • 1
  • 1
Max.Mirkia
  • 579
  • 6
  • 6
  • It works, but I completely do not understand why it works after these commands, and does not work before them. Can you explain it? – Daniel May 19 '17 at 07:32
2

I have found that setting MONGO_URL helps avoid issue

export MONGO_URL=mongodb://localhost:27017/your_db
gustavohenke
  • 40,997
  • 14
  • 121
  • 129
2

If you're having this issue running Ubuntu inside Vagrant/VirtualBox, then the problem come from working in the synced vagrant folder. The workaround is to initialize the .meteor directory in the home directory and to mount it in the synced folder. Assuming your meteor app is called MyApp and the /vagrant is the synced folder, here's how to do it:

cd ~  
meteor create MyApp  
cd MyApp  
meteor  
cd /vagrant/MyApp  
sudo mount --bind ~/MyApp/.meteor/ .meteor  
meteor  
hveiga
  • 6,725
  • 7
  • 54
  • 78
1

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
1

I encounter the same issue when my disk space ran low.

Freeing up some space in the disk fixed the problem for me.

tomyo
  • 289
  • 3
  • 11
1

I encountered this problem when I ran meteor in VMWare, ubuntu 14.04 guest on a Windows 7 host. The problem was that I was running meteor/mongo in a shared directory. When I used a non-shared directory (~/meteor/project) the problem disappeared.

Avi Tevet
  • 778
  • 1
  • 7
  • 13
1

Following the steps that @Oscar mentions further up should sort you out. However in my case meteor reset wouldn't work, telling me this:

reset: Meteor is running.

This command does not work while Meteor is running your application. Exit the running Meteor development server.

For which I tracked the process down, like this:

$ ps aux | grep meteor --color=auto

which gave me this info:

$ myUser            71981   0.5  0.0  2849208   3644   ??  S    Mon02pm   4:25.27 /Users/myUser/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod --bind_ip 127.0.0.1 --smallfiles --port 2001 --dbpath /Users/jgt/Documents/Projects/todos/.meteor/local/db --oplogSize 8 --replSet meteor

As you can see I'm on Mac, but this works fine on any Unix based OS. So then you only need to kill the process by it's id, like this:

$ kill -9 71981

And finally run again meteor reset

That's it, got it working now. Hope it helps.

2682562
  • 139
  • 2
  • 6
  • Forgot to say `meteor reset` will reset your project to a fresh state, removing all local data. For more info please visit [link](http://docs.meteor.com/#/basic/command-line) – 2682562 Feb 24 '16 at 09:07
0

One option is to wait until you have your app on a staging or production server, and then test it on an Android emulator provided by Android Studio or BlueStacks.

VikR
  • 4,818
  • 8
  • 51
  • 96
0

I am having this issue on WSL for Ubuntu on Windows. The only solution that worked for me was creating a remote mongodb with mLabs and ran the following

export MONGO_URL=mongodb://username:password@randomurl.mlab.com:port#/project
Anders Kitson
  • 1,413
  • 6
  • 38
  • 98
0

Recently I got the same case, which I run meteor on WSL for Ubuntu on windows 10. I resolved this case by updating WSL to version 2.

Note : Make sure your Windows build is higher than the minimum WSL 2 requirements. And don't forget to set version 2 as WSL default version after updating.

wsl --set-version [linux_dist] 2
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
-1

For windows 10, I moved all my Meteor projects in drive C. So far working.

tthreetorch
  • 426
  • 6
  • 9