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条回答
Luminary・发光体
2楼-- · 2019-01-07 10:52

This is what helped me.

  1. I deleted .meteor/local/db/mongod.lock
  2. I killed mongod process. You can find this using "ps -ef | grep mongo"
查看更多
Deceive 欺骗
3楼-- · 2019-01-07 10:52

I could recover the error by deleting the Local Mogo db lock.

Steps to remove the db lock :

  1. Navigate to your app directory(where you have Meteor application files)
  2. Remove file $ rm .meteor/local/db/mongod.lock

Error occurs if Meteor Application is still running in background. Db lock is not released by the running application or due to improper system/application shutdown and unavailable for second instance of same application. So take care to quit the application every time.

查看更多
放荡不羁爱自由
4楼-- · 2019-01-07 10:53

Using meteor reset erases all the data from your database. If you're worried about this then navigate to your project folder.

cd /path/to/my/project

Here you need to erase the mongodb.lock file.

rm .meteor/local/db/mongodb.lock

Now you can run Meteor using the command,

meteor

查看更多
爷的心禁止访问
5楼-- · 2019-01-07 10:54

I had the same issue on Windows 8.1 x64 : 'Unexpected mongo exit code 100. Restarting.'. And 'meteor reset' or 'delete mongod.lock' didn't solve it. To display the error details when launching mongod, I added a proc.stdout.on function in the run-mongo.js file :

// Let's not actually start a process if we yielded (eg during
// findMongoAndKillItDead) and we decided to stop in the middle (eg, because
// we're in multiple mode and another process exited).
if (stopped) return;

proc = spawnMongod(mongod_path, port, dbPath, replSetName);

// added this 3 lines just to debug 'Unexpected mongo exit code 100. Restarting.'
proc.stdout.on('data', function (data) {
  console.log('stdout: ' + data);
});

Then i got the explicit error :

*********************************************************************
ERROR: dbpath (C:\Users\Pierre-André\Desktop\Pal\Meteor\simple-todos\.meteor\local\db) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************

The error indicates the db directory doesn't exist. However, it exists. The problem was that i have a special character in the path (accent é in my name). I move my meteor project folder to another place in the disk which the path is accent free, and the it worked fine.

Hope that'll help.

The run-mongo.js file is located in my pc at : C:\Users\Pierre-André\AppData\Local\.meteor\packages\meteor-tool\1.1.10\mt-os.windows.x86_32\tools\runners

Don't forget to delete the 3 lines after solving the issue, or you'll have a lot of console logs each time the project is loaded.

查看更多
Lonely孤独者°
6楼-- · 2019-01-07 10:55

Solved! In my case deleting meteor/local/db/mongodb.lock and meteor reset fix the issue.

Thanks All!

查看更多
We Are One
7楼-- · 2019-01-07 10:55

I had a similar issue. It was due to the fact that my project directory was part of my Dropbox and there was some conflicted files in the .meteor/local/db directory. Removing these solved the problem.

查看更多
登录 后发表回答