简体   繁体   English

mongodb在Windows 10中绑定到0.0.0.0

[英]mongodb bind to 0.0.0.0 in windows 10

I am trying to bind 0.0.0.0 for my mongodb 我正在尝试为我的mongodb绑定0.0.0.0
I am doing " C:\\Program Files\\MongoDB\\Server\\4.0\\bin>mongod --bind_ip 0.0.0.0 " 我正在做“ C:\\ Program Files \\ MongoDB \\ Server \\ 4.0 \\ bin> mongod --bind_ip 0.0.0.0

but getting error: 但出现错误:

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

How to solve this?? 如何解决呢? I don't have permission to reinstall mongodb 我没有重新安装mongodb的权限

In the log output, you can see clearly that the issue isn't the network address, but that the data directory is not found, look for Data directory C:\\data\\db\\ not found., terminating . 在日志输出中,您可以清楚地看到问题不是网络地址,而是找不到数据目录,请查找Data directory C:\\data\\db\\ not found., terminating Create that directory (or set another existing location with the --dbpath argument) and MongoDB should start. 创建该目录(或使用--dbpath参数设置另一个现有位置),然后应该启动MongoDB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM