无法在Centos7上正确启动Mongod

发布于 2025-01-17 21:32:51 字数 1840 浏览 4 评论 0原文

运行 mongod --dbpath /var/lib/mongodb --repair 后,出现以下错误,现在我无法通过“service mongod start”启动 MongoDB,有人可以帮助我吗?用了一天多的时间来解决这个问题,但是并没有什么帮助!

{
    "t": { "$date": "2022-03-30T15:41:52.386+08:00" },
    "s": "E",
    "c": "STORAGE",
    "id": 22435,
    "ctx": "initandlisten",
    "msg": "WiredTiger error",
    "attr": {
        "error": 24,
        "message": "[1648626112:360534][222937:0x7f65fb141bc0], file:collection-76-7324578283188304824.wt, WT_SESSION.open_cursor: __posix_open_file, 808: /home/mongodb/data/collection-76-7324578283188304824.wt: handle-open: open: Too many open files"
    }
} 
{
    "t": { "$date": "2022-03-30T15:41:52.402+08:00" },
    "s": "F",
    "c": "STORAGE",
    "id": 50882,
    "ctx": "initandlisten",
    "msg": "Failed to open WiredTiger cursor. This may be due to data corruption",
    "attr": {
        "uri": "table:collection-76-7324578283188304824",
        "config": "",
        "error": {
            "code": 264,
            "codeName": "TooManyFilesOpen",
            "errmsg": "24: Too many open files"
        },
        "message": "Please read the documentation for starting MongoDB with --repair here: http://dochub.mongodb.org/core/repair"
    }
} 
{
    "t": { "$date": "2022-03-30T15:41:52.402+08:00" },
    "s": "F",
    "c": "-",
    "id": 23091,
    "ctx": "initandlisten",
    "msg": "Fatal assertion",
    "attr": {
        "msgid": 50882,
        "file": "src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp",
        "line": 109
    }
} 
{
    "t": { "$date": "2022-03-30T15:41:52.405+08:00" },
    "s": "F",
    "c": "-",
    "id": 23092,
    "ctx": "initandlisten",
    "msg": "\n\n***aborting after fassert() failure\n\n"
}

我首先运行 rm -r mongod.lock & db 文件夹中的 rm -r storage.bson ,然后 mongod --dbpath /var/lib/mongodb --repair ,但它们没有帮助。

After run mongod --dbpath /var/lib/mongodb --repair, I had the following errors and now I cannot boot my MongoDB by 'service mongod start', can anybody help me? More than one day had been used to solve this problem, but it did not help!

{
    "t": { "$date": "2022-03-30T15:41:52.386+08:00" },
    "s": "E",
    "c": "STORAGE",
    "id": 22435,
    "ctx": "initandlisten",
    "msg": "WiredTiger error",
    "attr": {
        "error": 24,
        "message": "[1648626112:360534][222937:0x7f65fb141bc0], file:collection-76-7324578283188304824.wt, WT_SESSION.open_cursor: __posix_open_file, 808: /home/mongodb/data/collection-76-7324578283188304824.wt: handle-open: open: Too many open files"
    }
} 
{
    "t": { "$date": "2022-03-30T15:41:52.402+08:00" },
    "s": "F",
    "c": "STORAGE",
    "id": 50882,
    "ctx": "initandlisten",
    "msg": "Failed to open WiredTiger cursor. This may be due to data corruption",
    "attr": {
        "uri": "table:collection-76-7324578283188304824",
        "config": "",
        "error": {
            "code": 264,
            "codeName": "TooManyFilesOpen",
            "errmsg": "24: Too many open files"
        },
        "message": "Please read the documentation for starting MongoDB with --repair here: http://dochub.mongodb.org/core/repair"
    }
} 
{
    "t": { "$date": "2022-03-30T15:41:52.402+08:00" },
    "s": "F",
    "c": "-",
    "id": 23091,
    "ctx": "initandlisten",
    "msg": "Fatal assertion",
    "attr": {
        "msgid": 50882,
        "file": "src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp",
        "line": 109
    }
} 
{
    "t": { "$date": "2022-03-30T15:41:52.405+08:00" },
    "s": "F",
    "c": "-",
    "id": 23092,
    "ctx": "initandlisten",
    "msg": "\n\n***aborting after fassert() failure\n\n"
}

I first run rm -r mongod.lock & rm -r storage.bson in db folder, and then mongod --dbpath /var/lib/mongodb --repair, but they did not help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文