Node.js – MongoDB stuck on clientcursormon (waiting for connections on port 27017)

localhostmongodbnode.js

After simply installing MongoDB and creating \data\db within the MongoDB folder, I proceeded to run mongod.exe –dbpath C:\MongoDB\data\db. It runs a bunch of initandlisten code and then when it waits for connections on port 27017 it hangs and writes out mem res:47 virt:171 mapped:80 connections:0. I am very new to Mongo and haven't found a definitive answer on why this is hanging and how to fix it.

Best Answer

If you want to run the mongod.exe process as a service under Windows (to avoid it taking up a command prompt) you should following these directions for MongoDB 2.6.0 (2.6.0 has a bug with the normal approach to configuring MongoDB as a service).

There is a known issue for MongoDB 2.6.0, SERVER-13515, which prevents the use of the instructions in this section. For MongoDB 2.6.0, use Manually Create a Windows Service for MongoDB to create a Windows Service for MongoDB instead.

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/#manually-create-windows-service

For MongoDB versions 2.6.1 and later follow the normal directions:

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/#configure-a-windows-service-for-mongodb

Related Topic