是的,还有其他非常相似的问题。但是,出现这种错误的原因似乎不同。
我启动MongoDB一次,它在我指定的数据文件夹中运行正常。当我再次运行它时(有时),它突然不再起作用并给我以下输出日志:
2018-01-31T00:31:39.636-0800 I CONTROL [initandlisten] MongoDB starting : pid=12248 port=27017 dbpath=C:\Users\20173591\Documents\GitHub\prijzen-volger\data 64-bit host=20173591
2018-01-31T00:31:39.636-0800 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-01-31T00:31:39.638-0800 I CONTROL [initandlisten] db version v3.6.2
2018-01-31T00:31:39.641-0800 I CONTROL [initandlisten] git version: 489d177dbd0f0420a8ca04d39fd78d0a2c539420
2018-01-31T00:31:39.641-0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22 Sep 2016
2018-01-31T00:31:39.642-0800 I CONTROL [initandlisten] allocator: tcmalloc
2018-01-31T00:31:39.642-0800 I CONTROL [initandlisten] modules: none
2018-01-31T00:31:39.643-0800 I CONTROL [initandlisten] build environment:
2018-01-31T00:31:39.643-0800 I CONTROL [initandlisten] distmod: 2008plus-ssl
2018-01-31T00:31:39.644-0800 I CONTROL [initandlisten] distarch: x86_64
2018-01-31T00:31:39.645-0800 I CONTROL [initandlisten] target_arch: x86_64
2018-01-31T00:31:39.646-0800 I CONTROL [initandlisten] options: { net: { port: 27017 }, storage: { dbPath: "C:\Users\20173591\Documents\GitHub\prijzen-volger\data" } }
2018-01-31T00:31:39.650-0800 I - [initandlisten] Detected data files in C:\Users\20173591\Documents\GitHub\prijzen-volger\data created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-01-31T00:31:39.651-0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3523M,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),statistics_log=(wait=0),verbose=(recovery_progress),
2018-01-31T00:31:39.832-0800 I STORAGE [initandlisten] WiredTiger message [1517387499:832376][12248:140720232489296], txn-recover: Main recovery loop: starting at 12/768
2018-01-31T00:31:39.953-0800 I STORAGE [initandlisten] WiredTiger message [1517387499:952865][12248:140720232489296], txn-recover: Recovering log 12 through 13
2018-01-31T00:31:40.034-0800 I STORAGE [initandlisten] WiredTiger message [1517387500:33883][12248:140720232489296], txn-recover: Recovering log 13 through 13
2018-01-31T00:31:40.162-0800 I CONTROL [initandlisten]
2018-01-31T00:31:40.162-0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-01-31T00:31:40.163-0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-01-31T00:31:40.164-0800 I CONTROL [initandlisten]
2018-01-31T00:31:40.166-0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2018-01-31T00:31:40.167-0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2018-01-31T00:31:40.168-0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2018-01-31T00:31:40.168-0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2018-01-31T00:31:40.168-0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2018-01-31T00:31:40.169-0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2018-01-31T00:31:40.169-0800 I CONTROL [initandlisten]
2018-01-31T00:31:40.169-0800 I CONTROL [initandlisten]
2018-01-31T00:31:40.170-0800 I CONTROL [initandlisten] ** WARNING: The file system cache of this machine is configured to be greater than 40% of the total memory. This can lead to increased memory pressure and poor performance.
2018-01-31T00:31:40.170-0800 I CONTROL [initandlisten] See http://dochub.mongodb.org/core/wt-windows-system-file-cache
2018-01-31T00:31:40.171-0800 I CONTROL [initandlisten]
2018-01-31T09:31:40.181+0100 F CONTROL [initandlisten] ** IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details.
2018-01-31T09:31:40.181+0100 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2018-01-31T09:31:40.182+0100 I REPL [initandlisten] shutdown: removing all drop-pending collections...
2018-01-31T09:31:40.182+0100 I REPL [initandlisten] shutdown: removing checkpointTimestamp collection...
2018-01-31T09:31:40.183+0100 I STORAGE [initandlisten] WiredTigerKVEngine shutting down
2018-01-31T09:31:40.569+0100 I STORAGE [initandlisten] WiredTiger message [1517387500:568961][12248:140720232489296], txn-recover: Main recovery loop: starting at 13/3072
2018-01-31T09:31:40.690+0100 I STORAGE [initandlisten] WiredTiger message [1517387500:690284][12248:140720232489296], txn-recover: Recovering log 13 through 14
2018-01-31T09:31:40.771+0100 I STORAGE [initandlisten] WiredTiger message [1517387500:770531][12248:140720232489296], txn-recover: Recovering log 14 through 14
2018-01-31T09:31:41.010+0100 I STORAGE [initandlisten] shutdown: removing fs lock...
2018-01-31T09:31:41.011+0100 I CONTROL [initandlisten] now exiting
2018-01-31T09:31:41.012+0100 I CONTROL [initandlisten] shutting down with code:62
我注意到以下消息:
2018-01-31T09:31:40.181+0100 F CONTROL [initandlisten] ** IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details.
但这是我第一次使用MongoDB,因此数据文件不可能不是版本3.6。我使用MongoDB版本3.6.2
并使用Node.js
创建条目。
导致此问题的原因是什么,以及如何检索我的数据文件?我已经两次丢失了两百多万个条目,这对于加载到数据库中很麻烦。
答案 0 :(得分:1)
我仍然不明白是什么导致了这个问题。但是,我设法解决了它。 One must downgrade from 3.6 to 3.4:
mongod.exe
文件答案 1 :(得分:0)
全新安装后,我遇到了相同的问题:
$ brew update
$ brew install mongodb
$ mkdir -p /data/db
$ sudo chown -R `id -un` /data/db
$ mongod
see console output when trying to run $ mongod
如果--dbpath中的数据文件与当前运行的mongod版本不兼容,则mongod返回documentation退出代码62。重新安装解决了该问题:
$ brew uninstall mongodb
$ brew install mongod