【问题标题】:The MongoDB service terminated with service-specific error Cannot create another system semaphoreMongoDB 服务因服务特定错误而终止 无法创建另一个系统信号量
【发布时间】:2016-01-03 13:54:13
【问题描述】:

我使用的是 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 错误。

【问题讨论】:

    标签: mongodb windows-services


    【解决方案1】:

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

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

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

    【讨论】:

      【解决方案2】:

      按照 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
      

      我使用的驱动器似乎存在空间问题

      【讨论】:

        【解决方案3】:

        我遇到了类似的问题,如下所示: Apache Tomcat 8.5 Tomcat8 服务因服务特定错误 Incorrect function 而终止。

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

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

        【讨论】:

          【解决方案4】:

          确保按照 mongodb.cfg 文件或 mongo db 配置文件中的指定创建数据目录和日志目录。就我而言,我丢失了其中一个文件。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 2018-06-26
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2019-02-25
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多