Search code examples
node.jsmongodbmeteor

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


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

Solution

  • 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