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

Hi,

I’m facing an issue with Meteor and MongoDB. When I type npm start to run my project, I get the following error message:

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.

I checked on Google, did meteor reset but also rm -rf .meteor/local/db/mongod.lock but nothing changes. Any idea?

1 Like

‘npm start’? What when you type ‘meteor run’

The same error message :slight_smile:

And you have permission to write in .meteor/local?

I guess ! Could you tell me how can I check this out? This folder was in read-only mode. I toggled off and I’m gonna retry!

What operating system are you on? Do you have any data you need to be saved in the db?

If Linux, open your file manager, go to your projects directory, press CTRL H to view hidden files, go into .meteor/local/db and try to create a file there.

…and if you can see the dir .meteor/local/db and have not important data, run ‘meteor reset’ in the terminal, in your projects root directory, and see if he content of the db directory changes

1 Like

Thanks for getting back to me!

I have no .meteor/local/db path. The path I have is C:\Users\Me\AppData\Local\lxss\home\Philippe\.meteor. I’m using Windows 10 and the Linux Subsystem. Then, in .meteor I have /package-metadata, /packages and a file called meteor.

And you do: meteor run from C:\Users\Me\AppData\Local\lxss\home\Philippe\ ?

try meteor reset there

Oh I see, that is just your home directory, you must check in your projects directory. There you have another .meteor folder, in there you have loca/db.

That’s the path to your WLS home/ directory as seen by Windows. You absolutely must not try changing linux files/folders via Windows - it can irretrievably damage the linux subsystem.

However, you can use your Windows C: drive as a shared drive in linux (it’s available as /mnt/c/).

Having said all that, you will have a .meteor/ folder within each of your meteor project folders. If you’re not used to using linux, you may not be aware they’re present, as by default the ls command doesn’t show “dotfiles”. You can use ll or ls -al to see them.

cd myapp
ls -al

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?