MongoDB容器无法运行Windows 10 [英] MongoDB Container Fails Windows 10
问题描述
我已经检查过了,但是堆栈溢出时还没有找到这个问题。如果找到它;链接它,然后我将关闭它。
I've checked around and I haven't found this issue yet on stack overflow. If you find it; link it and I'll close this one.
环境:
- Windows 10(最新)5/6/2019
- 共享C驱动器
- 从管理控制台执行cmd
操作:
docker run -d -p 27017:27017 -v C:/data/mongo:/data/db --name mongo mongo
预期结果:
Mongo容器将在后台运行。
Mongo container to be running in background.
会发生什么情况:
以下日志失败
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
推荐答案
重要
IMPORTANT
MongoDB需要一个在目录上支持fsync()的文件系统。
例如,HGFS和Virtual Box的共享文件夹不支持此
操作。
MongoDB requires a filesystem that supports fsync() on directories. For example, HGFS and Virtual Box’s shared folders do not support this operation.
使用Docker桌面时,在Windows上安装Docker桌面时,它需要并自动启用Microsoft的管理程序Hyper-V。 Hyper-V将Windows OS替换为计算机上的主机,并且Windows OS成为虚拟机。
In case you are using Docker Desktop, When you install Docker Desktop on Windows, it requires and automatically enables Hyper-V, a hypervisor from Microsoft. Hyper-V replaces your Windows OS as the host on the computer, and your Windows OS becomes a virtual machine.
这篇关于MongoDB容器无法运行Windows 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!