Permission denied mongo

i ran it one time with root access and when i want to run it with normal user i have this error

[[[[[ ~/Documents/xxx ]]]]]

=> Started proxy.
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.

/xxxxxxx/.meteor/packages/meteor-tool/.1.3.2_4.7rxjcj++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
throw error;
^
Error: EACCES, rename ‘/xxxxxx/Documents/xxx/.meteor/local/build’

If you don’t care about the data in your local mongo DB, then just remove the .meteor/local directory (and all contents) from within your app’s directory. If you want to preserve the DB, then look into giving your normal user privileges back using your OS’ supported method of doing this. If you’re using OSX/Linux for example, as a super user you would run something like:

cd your_app
chown -R your_user .meteor/local

now i have this prob

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.

Sounds like your permissions still aren’t quite right. You have to make sure your normal user has read/write/execute privileges in your app’s .meteor/local folder. Example for checking this with OSX/Linux:

cd your_app/.meteor
ls -l

You should see something like:

...
drwxr-xr-x  8 hwillson  staff   272  7 Jun 13:48 local
...

Where hwillson should be your normal user, and the drwxr-xr-x states that your user will have read/write/execute permissions on the local directory (the first rwx grouping is the important part).

drwxr-xr-x 11 neutron92 staff 374 Jun 10 12:24 local

but same prob

when i want to run it as root now i have this problem

=> Started proxy.
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.

These are the steps that solved my problem.

Delete .meteor/local/db/mongod.lock
Delete .meteor/local/db/journal/j.*(note: I only moved it just in case! ;D)
sudo meteor

Glad to hear it’s working.

It’s a good idea to avoid running Meteor as root.

Try using meteor reset and finding and killing all existing meteor and mongo processes.

1 Like

I am working on a class assignment and depend on peer review for a grade. I don’t get this error (and no errors in my console), but when a reviewer tries to run my App, she gets:

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.

Is it a problem on my end or more likely the reviewer doesn’t have MongoDB set up correctly with the right permissions?

Is your reviewer running your app with the meteor command line? If so, then Mongo is ran automatically for them. Is your reviewer on Windows?

Just wanted to follow up to say the reviewer didn’t have mongo installed correctly. 2 other reviewers were able to open and run my app. But, because of that 1 reviewer, I didn’t get a passing grade and have to retake the class!