【问题标题】:Cannot start mongo db无法启动 mongo db
【发布时间】:2017-08-02 08:48:29
【问题描述】:

我已经完成了以下链接https://docs.mongodb.com/manual/installation/中提到的mongodb安装过程但我无法启动mongodb这是我的日志请告诉我启动mongo db的可能方法

C:\>"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"
2017-03-12T12:42:55.378+0530 I CONTROL  [initandlisten] MongoDB starting : pid=5
400 port=27017 dbpath=C:\data\db\ 64-bit host=vimals
2017-03-12T12:42:55.379+0530 I CONTROL  [initandlisten] targetMinOS: Windows 7/W
indows Server 2008 R2
2017-03-12T12:42:55.380+0530 I CONTROL  [initandlisten] db version v3.4.2
2017-03-12T12:42:55.381+0530 I CONTROL  [initandlisten] git version: 3f76e40c105
fc223b3e5aac3e20dcd026b83b38b
2017-03-12T12:42:55.382+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL
 1.0.1u-fips  22 Sep 2016
2017-03-12T12:42:55.382+0530 I CONTROL  [initandlisten] allocator: tcmalloc
2017-03-12T12:42:55.383+0530 I CONTROL  [initandlisten] modules: enterprise
2017-03-12T12:42:55.384+0530 I CONTROL  [initandlisten] build environment:
2017-03-12T12:42:55.385+0530 I CONTROL  [initandlisten]     distmod: windows-64
2017-03-12T12:42:55.385+0530 I CONTROL  [initandlisten]     distarch: x86_64
2017-03-12T12:42:55.386+0530 I CONTROL  [initandlisten]     target_arch: x86_64
2017-03-12T12:42:55.387+0530 I CONTROL  [initandlisten] options: {}
2017-03-12T12:42:55.389+0530 I STORAGE  [initandlisten] exception in initAndList
en: 98 Unable to create/open lock file: C:\data\db\mongod.lock The process canno
t access the file because it is being used by another process.. Is a mongod inst
ance already running?, terminating
2017-03-12T12:42:55.390+0530 I NETWORK  [initandlisten] shutdown: going to close
 listening sockets...
2017-03-12T12:42:55.390+0530 I NETWORK  [initandlisten] shutdown: going to flush
 diaglog...
2017-03-12T12:42:55.391+0530 I CONTROL  [initandlisten] now exiting
2017-03-12T12:42:55.392+0530 I CONTROL  [initandlisten] shutting down with code:
100

【问题讨论】:

  • 有两种可能的选择:1.没有足够的权限运行mongodb 2.另一个mongodb进程已经在运行

标签: node.js mongodb mean-stack


【解决方案1】:

仅供参考。 就我而言,在我创建数据库之后:

sudo mkdir -p /data/db

我也必须这样做:

sudo chmod 777 /data/db

然后输入以下内容即可运行环境:

mongod

进入 mongoldb shell。

【讨论】:

    【解决方案2】:

    您的数据库文件好像被另一个进程锁定了,您是否尝试重新启动机器?

    【讨论】:

      猜你喜欢
      • 2020-08-02
      • 2012-09-12
      • 2016-06-09
      • 1970-01-01
      • 2014-01-14
      • 1970-01-01
      • 2016-10-31
      • 2017-11-12
      • 1970-01-01
      相关资源
      最近更新 更多