我已经检查过了,但是在堆栈溢出时还没有找到这个问题。如果找到它;链接它,我将关闭它。
环境:
操作:
docker run -d -p 27017:27017 -v C:/data/mongo:/data/db --name mongo mongo
预期结果:
Mongo容器在后台运行。
会发生什么:
以下日志失败
2019-05-06T16:28:25.980+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=2583M,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),
2019-05-06T16:28:26.525+0000 E STORAGE [initandlisten] WiredTiger error (1) [1557160106:524990][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1557160106:524990][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2019-05-06T16:28:26.544+0000 E STORAGE [initandlisten] WiredTiger error (17) [1557160106:544574][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1557160106:544574][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists
2019-05-06T16:28:26.548+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.1
2019-05-06T16:28:26.549+0000 E STORAGE [initandlisten] WiredTiger error (1) [1557160106:549461][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1557160106:549461][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2019-05-06T16:28:26.561+0000 E STORAGE [initandlisten] WiredTiger error (17) [1557160106:561653][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1557160106:561653][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists
2019-05-06T16:28:26.564+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.2
2019-05-06T16:28:26.566+0000 E STORAGE [initandlisten] WiredTiger error (1) [1557160106:566631][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1557160106:566631][1:0x7f3937620a80], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2019-05-06T16:28:26.568+0000 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2019-05-06T16:28:26.568+0000 F STORAGE [initandlisten] Reason: 1: Operation not permitted
2019-05-06T16:28:26.568+0000 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 704
2019-05-06T16:28:26.568+0000 F - [initandlisten]
***aborting after fassert() failure
答案 0 :(得分:0)
mongodb不支持VirtualBox共享文件夹。
重要
MongoDB需要一个在目录上支持fsync()的文件系统。 例如,HGFS和Virtual Box的共享文件夹不支持此功能 操作。
如果使用的是Docker Desktop,则在Windows上安装Docker Desktop时,它需要并自动启用Microsoft的管理程序Hyper-V。 Hyper-V将Windows OS替换为计算机上的主机,并且Windows OS成为虚拟机。
答案 1 :(得分:0)
我在 Windows 上运行 MongoDB 时遇到了“***aborting after fassert() failure”。
我的日志包括:
log file journal\wiredtiger log.0000000007 corrupted: bad magic number 1869181810: wt_try_salvage: database corruption detected
我尝试了很多方法,但解决此问题的唯一方法是删除 \mongodb\data\journal 文件夹中的所有文件并重新启动 MongoDB。
没有数据丢失。