全局初始化失败:BadValue日志路径需要Windows服务的绝对文件路径 [英] Failed Global Initialization: BadValue logpath requires an absolute file path with windows services

查看:764
本文介绍了全局初始化失败:BadValue日志路径需要Windows服务的绝对文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用配置文件安装mongod时,我不断收到此错误.因此,我正在看mongodb上有关Pluralsight的本教程.这个人的编程环境会尽可能顺利.但是,我遇到了几个问题.首先,我正在尝试设置其他日志路径和数据库路径.这是conf文件的基本布局

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 programming environment going as smoothly as it can. However, i am encountering several problems. First of all, i am trying to setup a different logpath and database path.This is the basic layout of the conf file

dbpath=/Pluralsight/db
logpath=/Pluralsight/mongod.conf
verbose=vvvvv

我的语法:

c:\Program Files\MongoDB\Server\3.0\bin\mongod -f c:\Pluralsight\mongod.conf
//Trying to run mongod using a configuration file

当我按Enter键时,我应该收到一条消息,指出所有内容都将定向到这个新的日志文件和一个新的数据库.我没有收到任何消息.但是,这并不能阻止它创建包含预期文件夹中信息的日志文件.现在,我继续将mongod安装为服务.这是我输入的时间

When i press enter, i am supposed to get a message that says everything is being directed to this new logfile and a new database. I do not get any message. However, that did not stop it from creating a log file with information in the expected folder. Now, I proceed to install mongod as a service. This is when i type

   C:\Program Files\MongoDB\Server\3.0\bin\mongod -f c:\Pluralsight\mongod.conf --install
    //using the configuration file to install mongod as a service

我收到一个错误:

全局初始化失败:BadValue日志路径需要绝对值 Windows服务的文件路径

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

我不知道该如何解决!

推荐答案

我在MongoDB的说明中遇到了相同的问题,因为一旦导航到MongoDB的bin,我就在CLI中为mongo.cfg使用了相对路径:

I was having the same problem with MongoDB's instructions because I was using relative path in the CLI for my mongo.cfg once I had navigated to the MongoDB bin:

mongod.exe --config mongod.cfg --install.

相反,我需要指定配置文件的绝对路径:

Instead I needed to specify the config file's absolute path:

mongod.exe --config "C:\Program Files\MongoDB\Server\3.0\bin\mongod.cfg" --install

这篇关于全局初始化失败:BadValue日志路径需要Windows服务的绝对文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆