我正在为我的mongodb绑定0.0.0.0
我正在执行“ C:\ Program Files \ MongoDB \ Server \ 4.0 \ bin> mongod --bind_ip 0.0.0.0 ”
但出现错误:
2018-07-26T18:08:17.909+0530 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-07-26T18:08:18.271+0530 I CONTROL [initandlisten] MongoDB starting : pid=14516 port=27017 dbpath=C:\data\db\ 64-bit host=xhdpranayd30
2018-07-26T18:08:18.271+0530 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-07-26T18:08:18.271+0530 I CONTROL [initandlisten] db version v4.0.0
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] git version: 3b07af3d4f471ae89e8186d33bbb1d5259597d51
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] allocator: tcmalloc
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] modules: none
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] build environment:
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] distmod: 2008plus-ssl
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] distarch: x86_64
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] target_arch: x86_64
2018-07-26T18:08:18.272+0530 I CONTROL [initandlisten] options: { net: { bindIp: "0.0.0.0" } }
2018-07-26T18:08:18.273+0530 I STORAGE [initandlisten] exception in initAndListen: NonExistentPath: Data directory C:\data\db\ not found., terminating
2018-07-26T18:08:18.273+0530 I CONTROL [initandlisten] now exiting
2018-07-26T18:08:18.273+0530 I CONTROL [initandlisten] shutting down with code:100
如何解决这个问题? 我没有重新安装mongodb的权限
答案 0 :(得分:0)
在日志输出中,您可以清楚地看到问题不是网络地址,而是找不到数据目录,请查找Data directory C:\data\db\ not found., terminating
。创建该目录(或使用--dbpath
参数设置另一个现有位置),MongoDB应该启动。