可以在前台运行`mongod`而不是守护进程

时间:2016-12-01 23:23:00

标签: mongodb

我可以正常运行mongod。但是,如果我运行service mongodb start,则日志中会显示以下错误,mongod无法启动。

2016-12-02T01:16:40.804+0200 F INDEX    [initandlisten] Found an invalid index { v: 2, key: { version: 1 }, name: "incompatible_with_version_32", ns: "admin.system.version" } on the admin.system.version collection: this version of mongod cannot build new indexes of version number 2

操作系统:Ubuntu 14.04.5 LTS

MongoDB版本:

$ mongod --version
db version v3.2.11
git version: 009580ad490190ba33d1c6253ebd8d91808923e4
OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
allocator: tcmalloc
modules: none
build environment:
    distmod: ubuntu1404
    distarch: x86_64
    target_arch: x86_64

更新:找到this。那么我应该在Ubuntu 14.04中等待v3.3.15吗?

1 个答案:

答案 0 :(得分:3)

尝试清除mongod并重启服务

    @echo off
    set /a file=file
    cd %cd%
    for /d %%b in (*) do dir /ad /on /s /b "%%b" >> get_dirs.txt
    for /F "tokens=*" %%A in (get_dirs.txt) do set /a text=%%A
    echo <a href="%file%:///%text%">%text%</a>
    pause

如果您仍有问题,请告诉我