Meteor: unexpected mongo exit code 100

2019-01-07 09:58发布

I have just installed Meteor version 0.5.9 (45fef52095) to my CentOS release 6.3 (Final) server (Linux version 2.6.32-279.19.1.el6.i686 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Dec 19 04:30:58 UTC 2012)

I have a samba share to a Windows SBS server mounted as /mnt/apshared under the apache user. I have created a directory inside this called 'webmeteor'. I have created an app called 'myapp' inside the 'webmeteor' directory, so my directory is like so: /mnt/apshared/webmeteor/myapp.

I am logged in as root. When I try to run the app using the meteor command, I am given the following error messages:

Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start mongod

MongoDB had an unspecified uncaught exception.
Check to make sure that MongoDB is able to write to its database directory.

My first point of call was this StackOverflow question: Creating a new meteor.js file and get error 100, MongoDB not able to write -- however, following these suggestions (sudo'ing the meteor command, and checking for disk space of which I have 70GB free) has not worked. I am quite certain that these issues are permission related.

I have tried to chown recursively to root:root (as I am logged in as root), and chmod to 777 recursively also, but to no avail.

I am asking you, what should I try next, to allow my Meteor app to start?

Thanks in advance.

26条回答
Fickle 薄情
2楼-- · 2019-01-07 10:37

I had my machine shutdown accidentally that led to the same problem. None of the option helped i.e deleting .lock file or running export LC_ALL=C etc.
I am on Ubuntu 15.04. I started mongo with --dbpath option pointing to myApp/.meteor/local/db and the mongo start up logs made it clear that mongo was attempting to restore the database from the journal/s in the journal folder. It was looking for local.1 file that did not exist.

So I tried mongo --recovery that further pointed that it won't work until I have the journal folder.
here's what I did
1. Deleted the journal folder (moved it to another location - just in case)
2. ran the mongo --recovery (not 100% sure if that actually did something)
3. started meteor
And it started without any glitch and guess what I had all my data as expected

查看更多
孤傲高冷的网名
3楼-- · 2019-01-07 10:40

I had the same problem, I solved it changing ownership of .meteor folder (where MongoDB lives)

cd path-to-meteor-app
sudo chown -R youruser:yourgruop .meteor

Hope to help someone!

查看更多
该账号已被封号
4楼-- · 2019-01-07 10:43

It looks like a temporary solution can be found by running meteor out of a directory that isn't in the mount. Mongodb doesn't seem to take too kindly to shares, so you'll need set up rsync to periodically copy the files from your share to the directory where meteor is running.

Source: Problems to run examples in Meteor

查看更多
一夜七次
5楼-- · 2019-01-07 10:43

this bug used to happen everytime I restarted meteor and

rm .meteor/local/db/mongod.lock

didn't work for me (i'm working on cloud9 online IDE)

I now do

rm .meteor/local/db/mongod.lock .meteor/local/db/local.*

and everything gets back to normal without erasing my database

查看更多
干净又极端
6楼-- · 2019-01-07 10:44

Mine was fixed in the end by running export LC_ALL=C. Found the error through the debugging steps suggested in this post: https://stackoverflow.com/a/15752736/1820510

查看更多
一纸荒年 Trace。
7楼-- · 2019-01-07 10:44

Make sure you have enough free space on that partition. If not, you'll get this very error.

查看更多
登录 后发表回答