Mongodb抛出“ initAndListen中的异常:NonExistentPath”

时间:2019-02-25 12:58:56

标签: mongodb

我尝试通过执行以下操作在MongoDB上安装配置文件:

  

在配置文件(mongod.cfg)中提及 dbPath ,然后运行“ mongod -config mongod.cfg --install”

但是它仍然显示相同的错误。我知道可以通过

手动指定数据路径
  

mongod --dbpath =“数据/数据库文件夹的位置”

每次运行时都是单调的。任何人都可以解释为什么尽管安装了配置文件但还是收到错误消息,还是建议一种永久设置数据文件夹位置的方法?

这是我得到的堆栈跟踪

2019-02-28T23:16:13.487+0530 I CONTROL  [main] Automatically disabling 
TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-02-28T23:16:13.490+0530 I CONTROL  [initandlisten] MongoDB starting : 
pid=11468 port=27017 dbpath=F:\data\db\ 64-bit host=DESKTOP-P2S6LJI
2019-02-28T23:16:13.491+0530 I CONTROL  [initandlisten] targetMinOS: 
Windows 7/Windows Server 2008 R2
2019-02-28T23:16:13.491+0530 I CONTROL  [initandlisten] db version v4.0.6
2019-02-28T23:16:13.491+0530 I CONTROL  [initandlisten] git version: 
caa42a1f75a56c7643d0b68d3880444375ec42e3
2019-02-28T23:16:13.492+0530 I CONTROL  [initandlisten] allocator: 
tcmalloc
2019-02-28T23:16:13.492+0530 I CONTROL  [initandlisten] modules: none
2019-02-28T23:16:13.492+0530 I CONTROL  [initandlisten] build environment:
2019-02-28T23:16:13.492+0530 I CONTROL  [initandlisten]     distmod: 
2008plus-ssl
2019-02-28T23:16:13.493+0530 I CONTROL  [initandlisten]     distarch: 
x86_64
2019-02-28T23:16:13.493+0530 I CONTROL  [initandlisten]     target_arch: 
x86_64
2019-02-28T23:16:13.493+0530 I CONTROL  [initandlisten] options: {}
2019-02-28T23:16:13.496+0530 I STORAGE  [initandlisten] exception in 
initAndListen: NonExistentPath: Data directory F:\data\db\ not found., 
terminating
2019-02-28T23:16:13.496+0530 I NETWORK  [initandlisten] shutdown: going to 
close listening sockets...
2019-02-28T23:16:13.497+0530 I CONTROL  [initandlisten] now exiting
2019-02-28T23:16:13.497+0530 I CONTROL  [initandlisten] shutting down with 
code:100

这是我的 mongod.cfg 文件mongod.cfg

0 个答案:

没有答案