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

前端 未结 10 1538
庸人自扰
庸人自扰 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:24

    I got the same error

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

    as I was specifying log path folder in mongo.config but I have to specify a log file

      dbpath=C:\Program Files\MongoDB\Server\3.4\data\db
      logpath=C:\Program Files\MongoDB\Server\3.4\log
      diaglog=3
    

    i changed my log file to

     dbpath=C:\Program Files\MongoDB\Server\3.4\data\db
     logpath=C:\Program Files\MongoDB\Server\3.4\log\mongo.log
     diaglog=3
    

    and after that this command solved my problem. hope this workfor you as well.

     mongod.exe --config "C:\Program Files\MongoDB\Server\3.4\mongo.config" --install
    

    then finally

    net start MongoDB
    

提交回复
热议问题