我对mongodb有意见。在从2.6升级之后,我不得不更改配置文件--以下是新的配置文件:
storage:
dbPath: "/var/lib/mongodb"
engine: wiredTiger
systemLog:
destination: file
path: "/var/log/mongodb/mongod.log"
logAppend: true
net:
bindIp: 127.0.0.1,192.168.14.81
port: 27017
# Enable the HTTP interface (Defaults to port 28017).
http:
enabled: false 但是启动脚本崩溃了--这是输出:
Error parsing YAML config file: yaml-cpp: error at line 5, column 5: end of map not found
try '/usr/bin/mongod --help' for more information我只使用白色符号(空格-不是制表符)。有人能跟我解释一下那间公寓怎么了吗?
发布于 2016-12-13 09:30:22
首先,尝试验证您的YAML文件是否有效,是否使用任何工具或在线网站为例。http://yaml-online-parser.appspot.com/并试图解决这些问题,因为我已经面临同样的问题。
在我的例子中,问题在于Tab字符。我在YAML文件的验证过程中检查了它,然后用空格字符替换Tab字符,用double()替换单个斜杠(),然后一切正常工作。
我的配置文件为:
systemLog:
destination: file
path: "c:\\data\\log"
storage:
dbPath: "c:\\data\\db"https://stackoverflow.com/questions/37611154
复制相似问题