【发布时间】:2022-03-06 12:08:50
【问题描述】:
我的数据库在 AWS 中运行,我升级到了 Mongo 5.0。现在我什至无法启动数据库,因为我收到以下错误:
mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2021-10-25 00:16:42 UTC; 26min ago
Docs: https://docs.mongodb.org/manual
Process: 3888 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=62)
Process: 3886 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 3883 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 3881 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
根据文档 status=62 表示存在不兼容问题。
我想降级回 4.4,但没有明确的方法可以这样做。 Mongo Docs 假设数据库正在运行并说要运行db.adminCommand( { setFeatureCompatibilityVersion: "4.4" } )
我无法运行此命令,因为 DB 甚至无法启动。
我删除了 5.0 二进制文件,但没有做任何事情。 DB版本仍然显示“5.0.3”
如果您能提供任何帮助,我们将不胜感激
这是一些额外的输出:
Unit mongod.service has begun starting up.
mongod[3591]: about to fork child process, waiting until server is ready for connections.
mongod[3591]: forked process: 3594
mongod[3591]: ERROR: child process failed, exited with 62
mongod[3591]: To see additional information in this output, start without the "--fork" option.
sudo[3579]: pam_unix(sudo:session): session closed for user root
systemd[1]: mongod.service: control process exited, code=exited status=62
systemd[1]: Failed to start MongoDB Database Server.
Subject: Unit mongod.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mongod.service has failed.
--
-- The result is failed.
systemd[1]: Unit mongod.service entered failed state.
systemd[1]: mongod.service failed.
运行以下命令:cat mongod.log | tail -10
{"t":{"$date":"2021-10-25T22:49:33.833+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1635202173:833865][3594:0x7f52128ce280], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 2, snapshot max: 2 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 441594"}}
{"t":{"$date":"2021-10-25T22:49:33.839+00:00"},"s":"I", "c":"STORAGE", "id":4795903, "ctx":"initandlisten","msg":"Reconfigure complete","attr":{"durationMillis":127}}
{"t":{"$date":"2021-10-25T22:49:33.839+00:00"},"s":"I", "c":"STORAGE", "id":4795902, "ctx":"initandlisten","msg":"Closing WiredTiger","attr":{"closeConfig":"leak_memory=true,"}}
{"t":{"$date":"2021-10-25T22:49:33.839+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1635202173:839582][3594:0x7f52128ce280], close_ckpt: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 4, snapshot max: 4 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 441594"}}
{"t":{"$date":"2021-10-25T22:49:33.867+00:00"},"s":"I", "c":"STORAGE", "id":4795901, "ctx":"initandlisten","msg":"WiredTiger closed","attr":{"durationMillis":28}}
{"t":{"$date":"2021-10-25T22:49:33.867+00:00"},"s":"I", "c":"STORAGE", "id":22279, "ctx":"initandlisten","msg":"shutdown: removing fs lock..."}
{"t":{"$date":"2021-10-25T22:49:33.867+00:00"},"s":"I", "c":"-", "id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}
{"t":{"$date":"2021-10-25T22:49:33.867+00:00"},"s":"I", "c":"FTDC", "id":4784926, "ctx":"initandlisten","msg":"Shutting down full-time data capture"}
{"t":{"$date":"2021-10-25T22:49:33.867+00:00"},"s":"I", "c":"CONTROL", "id":20565, "ctx":"initandlisten","msg":"Now exiting"}
{"t":{"$date":"2021-10-25T22:49:33.867+00:00"},"s":"I", "c":"CONTROL", "id":23138, "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":62}}
【问题讨论】:
-
你检查你的配置文件了吗?当您安装新的 MongoDB 时,配置文件会被默认文件覆盖。
-
你检查过日志mongod文件吗?
-
我添加了额外的日志输出
-
你能再展示一些吗,例如尾巴 -30
标签: mongodb amazon-ec2