Can't start mongodb service

I just instaled mongo 3. And tried to run it as windows server but receive error

The MongoDB 3.0 service terminated with the following service-specific error: 
Cannot create another system semaphore.

Can't find any info about that error and mongodb.


Check mongodb logs. In my case mongodb could not find directory from mongod.cfg

In my case it appered to be mongod.lock issue after unexpected shutdown.

Detected unclean shutdown - E:\MongoDb\Databases\mongod.lock is not empty.

I deleted E:\MongoDb\Databases\mongod.lock and mongo successfuly started.

Also check permissions for dbpath and logpath. In my case I had configured mongo as a service running as Network Service, but, hadn't given Network Service write access to those directories.

This happened for me a couple times because my Mac crashed which resulted in unclean shutdown of Parallels and my Mongo instance. mongod.lock was not empty.

This was on a development server so I didn't have backups. I was able to repair by using

mongod --repair --repairpath <path to your mongo data>

More instructions here

In case this helps anyone else, for me it was that I had started mongod.exe manually in a command prompt window so the windows service couldn't run mongod.exe on the same port already in use. Doh!

I had the same problem and in my case the config was wrong. This error from event viewer is not very helpful and mostly confusing so everyone should check mongo logs first.

Need Your Help

Sharing progress data between Android apps

android sharedpreferences

I've nearly finished writing a game for the Android market. I have a full version and a free version with half the levels. I’ve read of a lot of people in similar situation with the following pro...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.