Meteor: Unexpected mongo exit code 14. Restarting.Can't start mongo server
Asked Answered
Y

7

14

when i try to start meteor app i get this error

=> Started proxy.                             
Unexpected mongo exit code 14. Restarting.    
Unexpected mongo exit code 14. Restarting.  

and i when try to access mongodb via shell everything is ok and shell opens and connects to mongodb

mongodb log file is also clean and doesn't show any error

i'm running mongo with

my os is Ubuntu 16.04

mongod --fork --logpath /var/log/mongodb.log
Yiyid answered 17/8, 2016 at 4:56 Comment(1)
Which Meteor & MongoDB version are you using?Schott
K
12

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  
Katrinakatrine answered 1/9, 2016 at 18:21 Comment(2)
+1 If you happen to be using Ubuntu (check!) inside Vagrant (check!) / Virtual box (check!), working in the synced vagrant folder (check!). That's four out of four. It's like the big guy in the sky sent you down here to save us all (from our dodgy meteor apps)Outsoar
There's some further explanation about this in this Vagrant Meteor 1.3 boxOutsoar
R
13

Try:

meteor update --release *LAST STABLE VERSION FOR YOU*
meteor

If it's still not working, try:

meteor reset
meteor

Otherwise, if that still doesn't work, try removing the local db folder then running meteor again like this:

rm -r .meteor/local/db folder
meteor
Reprisal answered 18/8, 2016 at 16:25 Comment(1)
Resetting the db worked for me meteor reset meteorHamblin
K
12

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  
Katrinakatrine answered 1/9, 2016 at 18:21 Comment(2)
+1 If you happen to be using Ubuntu (check!) inside Vagrant (check!) / Virtual box (check!), working in the synced vagrant folder (check!). That's four out of four. It's like the big guy in the sky sent you down here to save us all (from our dodgy meteor apps)Outsoar
There's some further explanation about this in this Vagrant Meteor 1.3 boxOutsoar
W
9

Also experienced this problem. To fix the problem in my case i needed to remove /tmp/mongodb-<port>.sock file

Weinman answered 10/10, 2016 at 19:17 Comment(0)
W
1

In my case it was a problem with db after upgrading meteor from 1.6 to 1.7. To solve the issue I had to repair my local db with the next command:

~/.meteor/packages/meteor-tool/1.6.0_1/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod --dbpath /my-app/.meteor/local/db --repair

/1.6.0_1/ stands for Meteor release I was trying to run.

Waverly answered 14/8, 2019 at 10:6 Comment(0)
E
1

This happened to me with Meteor 1.6 running on Windows 10 and WSL with Ubuntu. I actually followed the short youtube video here: https://www.youtube.com/watch?v=EjmOkiiMAWw

Basically, this is similar to what @bilal-el-tayara is saying. If your git it set up to run on your local (Windows) machine, and you're running Meteor from WSL - you'll need to create a symbolic link for the .meteor/local/db subdirectory.

What I did was:

cd
mkdir mongo
cd /mnt/c/my_meteor_project/.meteor/local
rm -rf db
ln -s ~/mongo db
cd ../..
meteor
Emasculate answered 27/4, 2020 at 7:5 Comment(1)
I was having the problem as you, and it worked like a charmNaoise
V
1

just type this command it worked for me

meteor reset
Velarium answered 22/6, 2021 at 14:40 Comment(0)
H
0

When I have one of these errors out of nowhere, turning the computer off and on again always fixes this particular issue for me.

Harakiri answered 26/10, 2023 at 10:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.