【问题标题】:Receiving Mongo error when trying to start up mongo instance for Rocket.Chat尝试为 Rocket.Chat 启动 mongo 实例时收到 Mongo 错误
【发布时间】:2020-05-12 22:21:15
【问题描述】:

我重新启动了拥有私有 Rocket.Chat 服务器的服务器,突然发现以 RC 开头的 mongo 实例出现以下问题:

[initandlisten] MongoDB starting : pid=12518 port=27017 dbpath=/var/snap/rocketchat-server/common 64-bit host=fight_club_wi
[initandlisten] db version v3.4.20
[initandlisten] git version: 447847d93d6e0a21b018d5df45528e815c7c13d8
[initandlisten] allocator: tcmalloc
[initandlisten] modules: none
[initandlisten] build environment:
[initandlisten]     distarch: x86_64
[initandlisten]     target_arch: x86_64
[initandlisten] options: { net: { bindIp: "127.0.0.1" }, processManagement: { pidFilePath: "/var/snap/rocketchat-server/common/mongod.pid" }, replication: { replSet: "rs0" }, storage: { dbPath: "/var/snap/rocketchat-server/common", journal: { enabled: true }, mmapv1: { smallFiles: true } } }
[initandlisten] Detected data files in /var/snap/rocketchat-server/common created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
[initandlisten]
[initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
[initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
[initandlisten] wiredtiger_open config: create,cache_size=3471M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),
[initandlisten] WiredTiger error (-31802) [1589320129:556327][12518:0x7f7a2e9d8d00], txn-recover: unsupported WiredTiger file version: this build  only supports major/minor versions up to 1/0,  and the file is version 2/0: WT_ERROR: non-specific WiredTiger error
[initandlisten] WiredTiger error (0) [1589320129:556377][12518:0x7f7a2e9d8d00], txn-recover: WiredTiger is unable to read the recovery log.
[initandlisten] WiredTiger error (0) [1589320129:556395][12518:0x7f7a2e9d8d00], txn-recover: This may be due to the log files being encrypted, being from an older version or due to corruption on disk
[initandlisten] WiredTiger error (0) [1589320129:556409][12518:0x7f7a2e9d8d00], txn-recover: You should confirm that you have opened the database with the correct options including all encryption and compression options
[initandlisten] WiredTiger error (-31802) [1589320129:556427][12518:0x7f7a2e9d8d00], txn-recover: Recovery failed: WT_ERROR: non-specific WiredTiger error
[initandlisten] Assertion: 28595:-31802: WT_ERROR: non-specific WiredTiger error src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 277
[initandlisten] exception in initAndListen: 28595 -31802: WT_ERROR: non-specific WiredTiger error, terminating
[initandlisten] shutdown: going to close listening sockets...
[initandlisten] removing socket file: /tmp/mongodb-27017.sock
[initandlisten] shutdown: going to flush diaglog...
[initandlisten] now exiting
[initandlisten] shutting down with code:100

除了可能是最近对 mongo 的更新之外,我不确定是什么导致了该问题,但我认为这不会发生,因为我在过去 12 小时内没有看到任何表明更新的日志。

我目前在 Ubuntu 18.04 LTS 服务器上运行最新的稳定 Rocket Chat 版本。 Nginx 只是返回一个 502 Bad Gateway 错误,但我认为这是一个红鲱鱼,因为数据库不会加载,当我查询机器拥有的网站并且 Nginx 服务器指向该网站时工作正常。

因此我需要重新开始吗?

任何建议的帮助将不胜感激。

【问题讨论】:

  • 所以,我不知道发生了什么。我正准备听从 Max 的建议,但在此之前我想克隆驱动器以进行备份。克隆驱动器后,我将备份保存在原始机器中以确保它能够正确启动,并且'你瞧,现在数据库正在正确加载。我有点无语,但我想感谢大家的意见。

标签: mongodb rocket.chat


【解决方案1】:

这个错误:

WiredTiger 错误 (-31802) [1589320129:556327][12518:0x7f7a2e9d8d00], txn-recover: 不支持的 WiredTiger 文件版本:此构建仅支持最高 1/0 的主要/次要版本,并且文件是版本 2/ 0: WT_ERROR: 非特定的 WiredTiger 错误

表示数据文件是由较新版本的 MongoDB 写入的。

您可以升级到 MongoDB 4.0 以读取现有文件,或者从数据目录中清除文件并重新开始。

【讨论】:

    【解决方案2】:

    删除data/db文件夹中的.lock文件,再试一次

    【讨论】:

      猜你喜欢
      • 2015-07-08
      • 2020-01-03
      • 2017-04-06
      • 2020-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-25
      相关资源
      最近更新 更多