问题
I was trying to run Meteor on my VPS and I was getting this error:
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 have figured out that the problem is in my user permissions or something like that. It works very smoothly when I try to run meteor with root
access. If I try to run meteor with my "custom
" user, it fails. Even though I grant him sudo privileges as listed on DigitalOcean. Why is it so? What is the problem behind?
I am on Ubuntu 14.04.1 LTS. Meteor is version 0.8.3 and I am using MongoDB coming with Meteor. I do not have seperated instalation of MongoDB.
Update: Basicly I have found the problem but I still do not now what is causing the problem. I am on DigitalOcean VPS. If I run Meteor over SSH, it fails. If I run Meteor on web Console Access, it works. I do not get it.
回答1:
Answer https://stackoverflow.com/a/15752736 helped me to find out that Mongo doesn't want to start without properly set locale.
Try to run export LC_ALL="en_US.UTF-8"
command before meteor
command.
回答2:
WARNING: This deletes the database and all of the application's data.
rm -rf .meteor/local
Solved it for me when none of the above solutions did.
回答3:
I would guess that the custom user you created cannot remove the mongod.lock file due to insufficient premissions.
回答4:
Also check that you have space on your HD, That was my problem.
来源:https://stackoverflow.com/questions/25102414/unexpected-mongo-exit-code-100-restarting