Error with Mongo starting Meteor
Asked Answered
M

14

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.

Mackle answered 22/1, 2014 at 1:22 Comment(1)
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. :-(Drambuie
M
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.

Malpighiaceous answered 22/1, 2014 at 2:52 Comment(3)
Delete the file .meteor/local/db/mongod.lock and run meteor again alone worked for me without the machine OR meteor resets. Simply delete the file, stop and start the meteor app and you're away (in my case).Bally
yup all I needed was meteor reset!Cyanogen
meteor reset did it for me too!Stuyvesant
T
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
Tank answered 19/4, 2014 at 3:54 Comment(2)
Do you need to restart for it to work? Can you explain what the line does?Infract
LC_ALL is the environment variable that overrides all the other localization settings read more here: 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.Tank
P
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.

Pelagias answered 18/11, 2014 at 6:35 Comment(0)
G
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.

Gulick answered 1/9, 2015 at 19:14 Comment(1)
It works, but I completely do not understand why it works after these commands, and does not work before them. Can you explain it?Vevina
I
2

I have found that setting MONGO_URL helps avoid issue

export MONGO_URL=mongodb://localhost:27017/your_db
Inviolable answered 7/3, 2015 at 22:31 Comment(1)
Interesting that this was voted down as this was only answer that I could find to fix issue.Inviolable
C
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  
Cataldo answered 1/9, 2016 at 17:8 Comment(0)
B
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.

Belle answered 17/9, 2014 at 20:4 Comment(0)
R
1

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

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

Rumal answered 10/12, 2014 at 19:30 Comment(0)
F
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.

Formalism answered 30/3, 2015 at 3:5 Comment(0)
G
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.

Goethite answered 24/2, 2016 at 8:58 Comment(1)
Forgot to say meteor reset will reset your project to a fresh state, removing all local data. For more info please visit linkGoethite
Z
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.

Zantos answered 21/8, 2018 at 17:45 Comment(0)
K
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:[email protected]:port#/project
Kaczmarek answered 21/1, 2019 at 22:43 Comment(0)
H
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
Hedberg answered 16/1, 2023 at 1:15 Comment(0)
F
-1

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

Felid answered 29/10, 2017 at 14:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.