程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了我在启动 mongo 守护程序时收到此错误,它说我没有创建 /data/db 目录,但创建了一个并将其设置为 db 路径大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决我在启动 mongo 守护程序时收到此错误,它说我没有创建 /data/db 目录,但创建了一个并将其设置为 db 路径?

开发过程中遇到我在启动 mongo 守护程序时收到此错误,它说我没有创建 /data/db 目录,但创建了一个并将其设置为 db 路径的问题如何解决?下面主要结合日常开发的经验,给出你关于我在启动 mongo 守护程序时收到此错误,它说我没有创建 /data/db 目录,但创建了一个并将其设置为 db 路径的解决方法建议,希望对你解决我在启动 mongo 守护程序时收到此错误,它说我没有创建 /data/db 目录,但创建了一个并将其设置为 db 路径有所启发或帮助;
    {"t":{"$date":"2021-06-29T00:04:22.133+05:30"},"s":"I","c":"CONTRol","ID":23285,"ctx":"main","msg":"automatically disabling TLS 1.0,to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2021-06-29T00:04:22.137+05:30"},"s":"W","c":"ASIO","ID":22601,"msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2021-06-29T00:04:22.137+05:30"},"c":"NETWORK","ID":4648602,"msg":"Implicit TCP Fastopen in use."}
{"t":{"$date":"2021-06-29T00:04:22.138+05:30"},"c":"STORAGE","ID":4615611,"ctx":"initandListen","msg":"MongoDB starTing","attr":{"pID":25579,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"venkatasrIDharsais-MACBook-Pro.local"}}
{"t":{"$date":"2021-06-29T00:04:22.138+05:30"},"ID":23403,"msg":"Build Info","attr":{"buildInfo":{"version":"4.4.5","gitVersion":"ff5cb77101b052fa02da43b8538093486cf9b3f7","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2021-06-29T00:04:22.138+05:30"},"ID":51765,"msg":"OperaTing System","attr":{"os":{"name":"Mac OS X","version":"20.5.0"}}}
{"t":{"$date":"2021-06-29T00:04:22.138+05:30"},"ID":21951,"msg":"Options set by command line","attr":{"options":{}}}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"s":"E","ID":20557,"msg":"DBException in initAndListen,terminaTing","attr":{"error":"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option,or (2) by adding the 'storage.dbPath' option in the configuration file."}}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"c":"REPL","ID":4784900,"msg":"StepPing down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":10000}}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"c":"COMMAND","ID":4784901,"msg":"ShutTing down the MirrorMaestro"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"c":"SHARDING","ID":4784902,"msg":"ShutTing down the WaitForMajorityservice"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":20562,"msg":"Shutdown: going to close Listening sockets"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784905,"msg":"ShutTing down the global connection pool"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784906,"msg":"ShutTing down the FlowControlTicketholder"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"c":"-","ID":20520,"msg":"StopPing further Flow Control ticket acquisitions."}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784918,"msg":"ShutTing down the replicasetMonitor"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784921,"msg":"ShutTing down the MigrationUtilExecutor"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784925,"msg":"ShutTing down free monitoring"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784927,"msg":"ShutTing down the HealthLog"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784929,"msg":"Acquiring the global lock for shutdown"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":4784931,"msg":"DropPing the scope cache for shutdown"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"c":"FTDC","ID":4784926,"msg":"ShutTing down full-time data capture"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":20565,"msg":"Now exiTing"}
{"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"ID":23138,"msg":"ShutTing down","attr":{"exitCode":100}}

我尝试更改数据库路径。但是那一次它起作用了,但是如果我再次尝试执行 @H_6_3@mongod 命令失败并再次出现相同的错误消息任何修复都会有所帮助。

解决方法

这一行说明了一切:

 {"t":{"$date":"2021-06-29T00:04:22.139+05:30"},"s":"E","c":"STORAGE","id":20557,"ctx":"initandlisten","msg":"DBException in initAndListen,terminaTing","attr":{"error":"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option,or (2) by adding the 'storage.dbPath' option in the configuration file."}}

检查您的 sintax ,或添加您的配置文件或用于启动 mongod 服务的命令行...

大佬总结

以上是大佬教程为你收集整理的我在启动 mongo 守护程序时收到此错误,它说我没有创建 /data/db 目录,但创建了一个并将其设置为 db 路径全部内容,希望文章能够帮你解决我在启动 mongo 守护程序时收到此错误,它说我没有创建 /data/db 目录,但创建了一个并将其设置为 db 路径所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。