Help with Meteor and MongoDB: Unexpected mongo exit code 100. Restarting

You’re right, I have this .meteor\local\db in my project. I did meteor reset, got the Project reset. message, but when I run meteor again, I still get this error message :

npm start

> pup@ start /mnt/c/Users/Philippe/Documents/Développement/BlockChainPartner/pocmaif-meteor
> meteor --settings settings-development.json

[[[[[ /mnt/c/Users/Philippe/Documents/Développement/BlockChainPartner/pocmaif-meteor ]]]]]

=> Started proxy.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start Mongo server.
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.

And when I wanna reach C:\Users\Me\AppData\Local\lxss\home\Philippe\ I’m told that I don’t have the right to access this folder. I did sudo chown -R Philippe /home/Philippe but it doesn’t work.

When you run the commands, meteor start/reset and so on, are you running it from your projects home directory? Where you have your code?

I’m running npm start (equivalent to meteor run in my package.json) at the root of the project. And I ran the reset in the db folder.

Well, /mnt/c/... is your mapped Windows C: drive. There are known issues when running MongoDB on mapped drives, so I think this is just one of those.

When I start Ubuntu on Windows I’m launched straight into my /home/folder. I’ve had no issues running Meteor from there. I’m a little surprised to see that your project folder is at /mnt/c/Users/Philippe/Documents/Développement/BlockChainPartner/pocmaif-meteor, which suggests you did a cd to there to create your project?

Try creating a project in your home directory and running meteor from there. If it works, then the issue is with MongoDB and mapped drives. In which case you’ll need to move your project off your C: drive and into your linux /home/Phillipe/ folder.

No, you should run everything from you projects folder.
But follow Rob’s advice above.

Hi ! Thanks for your help!

My project is in C:/Users/Philippe/Documents/Développement/BlockChainPartner/pocmaif-meteor. This is a git clone from GitHub I did from Windows. It works without any issue under Ubuntu, but not under Windows with the Ubuntu subsystem.

I created a new project with meteor create test. Then I did cd test and meteor. I get the same error message. So what does it mean?

Did you create that in your Ubuntu home directory or in /mnt/c/Users/...?

If you, at that position, run the command:
ls .meteor/local/db
What do you get?

Here’s the path that I have and what they contain, could you tell me what’s the one you’re talking about ?

C:\Users\Philippe\AppData\Local\lxss\home\Philippe
.config
.meteor
.nano
and other folders like these ones
C:\Users\Philippe\AppData\Local\lxss\mnt\c
Empty folder
C:\Users\Philippe\AppData\Local\lxss\rootfs\home
Empty folder
C:\Users\Philippe\AppData\Local\lxss\rootfs\mnt
Empty folder

The important thing to know is that folder lxss is not visible in the Windows UI, even if I checked the case to make hidden folders visible. And when I use the command line, I can go until this lxss folder and then, starting from home (and subfolders) I get a message saying that permission is denied.

When I run ls .meteor/local/db in the test folder, here’s what I get : mongod.lock WiredTiger WiredTiger.lock WiredTiger.wt WiredTiger.wt.1 WiredTiger.wt.2

Let’s take this one step at a time:

If you’re using WLS (Ubuntu on Windows) you don’t need to know or care about the Windows folders. In fact, generally speaking, you should forget they exist.

When you start Ubuntu you will be put into your Linux home directory. I suspect it’s something like /home/Phillipe/. You can check this with the pwd command:

pwd            (type this in)
/home/Phillipe (this is reported)

From that folder, try creating the default Meteor app:

meteor create demoapp
cd demoapp                 (you will now be in /home/Phillipe/demoapp/)
meteor npm i
meteor

and then in your normal Windows browser, go to http://localhost:3000 and check it’s working.

Yes, it worked that time :tada: ! I think we’re closed to the final solution :slight_smile:

I did exactly what you told me, so I ran Bash on Ubuntu on Windows. You’re right, typing pwd returns home/Philippe.

I did the same with the terminal I usually use (Hyper), directly after opening it: /mnt/c/Users/Philippe is the result I get. I guess they’re not the same folder. If not, what’s the right path to go to /home/Philippe from Hyper?

Thanks a lot for your help man, you rock!

As in https://hyper.is/?

I have no experience of that, but it’s available for Ubuntu, so if you want to use that in place of bash you’ll need to install it on Ubuntu - I’m pretty sure a Windows installation will not be what you want - and could be dangerous, as I mentioned in an earlier post.

My honest recommendation would be use bash in Ubuntu.

Yes, that’s it!

I must stay on Windows for some professional reasons. Thanks a lot for your help, I’ll do more researches and will post my solution if I find one that suits my needs :wink:

Then use PowerShell and a standard Windows installation of Meteor.

This was the same my problem few month ago. (windows 7 64bit)
For my experience, this is one of two unaccountable big downsides when entering Meteor.

  • reasoning: somehow Meteor installs 32bit mongo db in 64bit OS
  • solution: use another stand alone mongodb
    => I wrote about this before:

  1. Symptom
  • It hangs on when “meteor run” for the very first example project:
    meteor mongodb “Unexpected mongo exit code 100”
    (Environment: windows 7 64bit, Meteor 1.5.1)
  1. Working solution
    ref:
    http://www.ryanmartinphd.com/meteor-on-windows-with-standalone-mongodb/
    =>
  • Setting environment variable MONGO_URL
    setx MONGO_URL mongodb://localhost:27017/meteor
  • Start another stand alone mongodb before starting program

Sounds clean, someday I might try that with this.

hey @zefifi have you ever found a solution to the mongo error? I installed linux subsystem and it doesnt work from my C drive I think its a problem with the formatting of the HD and permsssions. If I run it from the ~ home folder meteor works.

I am back using windows 10 meteor now but the linux version would be much better.

I have the same problem with Meteor 1.8.0.2

Hope to find a fix quickly