Failed Global Initialization: BadValue logpath requires an absolute file path with windows services

前端 未结 10 1524
庸人自扰
庸人自扰 2021-02-19 07:25

I am getting this error constantly while i am trying to install mongod using a configuration file. So, I am looking at this tutorial on Pluralsight on mongodb. The person\'s pro

10条回答
  •  执笔经年
    2021-02-19 08:14

    I faced the same problem while installing the MongoDB service by specifying the logpath and dbpath flags directly from the command line.

    mongod --install --logpath='' --dbpath=''
    

    It turned out that the logpath and dbpath values had to be wrapped inside double quotes (i.e. "") instead of single qoutes, or otherwise no quotes at all if the paths are without any spaces in the absolute directory path.

    So the following did the trick for me:

    mongod --install --logpath="" --dbpath=""
    

    Notice the paths wrapped within double qoutes.

提交回复
热议问题