MongoDB 服务因服务特定错误而终止无法创建另一个系统信号量

The MongoDB service terminated with service-specific error Cannot create another system semaphore

我正在使用 MongoDB 3.0 版。我已经将 mongodb 安装为 windows 服务,该服务一直在运行。现在突然间,服务无法启动,事件日志显示此错误 The MongoDB service terminated with service-specific error Cannot create another system semaphore

我不确定如何处理此错误消息。

我不确定它是否有用,但我的 windows 2008 服务器上的其他一些服务也停止了自行启动。

其中一项 windows 服务出现 Not enough storage is available to proceess this request 错误。

首先找到你的 mongod.cfg 文件(对我来说 C:\Program Files\MongoDB 2.6 Standard

#where to log
logpath=D:\MongoDatas\log\mongod.log

然后查看日志文件的最后几行。

根据 JPBlanc 的建议,我查看了日志并发现了以下条目:

2015-10-06T11:17:48.403-0400 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-10-06T11:17:48.403-0400 I CONTROL  Trying to start Windows service 'MongoDB'
2015-10-06T11:17:48.403-0400 I STORAGE  Service running
2015-10-06T11:17:48.423-0400 I JOURNAL  [initandlisten] journal dir=C:\Program Files\MongoDB\data\db\journal
2015-10-06T11:17:48.424-0400 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
2015-10-06T11:17:48.425-0400 I JOURNAL  [initandlisten] 
2015-10-06T11:17:48.425-0400 E JOURNAL  [initandlisten] Insufficient free space for journal files
2015-10-06T11:17:48.425-0400 I JOURNAL  [initandlisten] Please make at least 3379MB available in C:\Program Files\MongoDB\data\db\journal or use --smallfiles
2015-10-06T11:17:48.425-0400 I JOURNAL  [initandlisten] 
2015-10-06T11:17:48.428-0400 I STORAGE  [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
2015-10-06T11:17:48.429-0400 I CONTROL  [serviceStopWorker] now exiting
2015-10-06T11:17:48.429-0400 I NETWORK  [serviceStopWorker] shutdown: going to close listening sockets...
2015-10-06T11:17:48.429-0400 I NETWORK  [serviceStopWorker] shutdown: going to flush diaglog...
2015-10-06T11:17:48.429-0400 I NETWORK  [serviceStopWorker] shutdown: going to close sockets...
2015-10-06T11:17:48.429-0400 I STORAGE  [serviceStopWorker] shutdown: waiting for fs preallocator...
2015-10-06T11:17:48.429-0400 I STORAGE  [serviceStopWorker] shutdown: final commit...
2015-10-06T11:17:48.429-0400 I STORAGE  [serviceStopWorker] shutdown: closing all files...
2015-10-06T11:17:48.429-0400 I STORAGE  [serviceStopWorker] closeAllFiles() finished
2015-10-06T11:17:48.429-0400 I CONTROL  [serviceStopWorker] dbexit:  rc: 49

我使用的驱动器似乎 space 有问题

我遇到过类似的问题如下: A​​pache Tomcat 8.5 Tomcat8 服务终止,服务特定错误不正确的功能。

而且我发现 tomcat 日志中有一条错误消息: [错误] [3304] 创建失败 java C:\Program Files\Java\jre1.8.0_101\bin\server\jvm.dll

修复此错误后,我们可以正常启动tomcat。 仅供参考。

确保按照 mongodb.cfg 文件或 mongo 数据库配置文件中的指定创建数据目录和日志目录。就我而言,我丢失了其中一个文件。欲了解更多信息,请访问:https://www.mongodb.com/docs/manual/reference/configuration-options/