问题描述
我正在尝试在Windows中运行mongo db容器,并将其映射到Windows文件夹。
I am trying to run a mongo db container in windows with a volume mapping to a windows folder.
我按照babak在问题。该文件夹可以正确映射,但是会创建许多名为WiredTiger.wt.1的文件,其中末尾的数字不断增加。
I have followed the answer by babak in this question. The folder maps properly, but it creates lots of files named WiredTiger.wt.1 where the number at the end keeps incrementing.
我在日志中得到以下几行:
I get the following lines in the log:
2020-06-12T12:49:11.431 + 0000我存储[initandlisten]找到WiredTiger消息意外文件WiredTiger.wt,重命名为WiredTiger.wt.13233
2020-06-12T12:49:11.431+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.13233
2020-06-12T12:49:11.433 + 0000 E存储[initandlisten] WiredTiger错误(1)[1591966151:433603] [1:0x7ff261e16b00],连接:__posix_open_file,667: /data/db/WiredTiger.wt:句柄打开:打开:不允许操作Raw:[1591966151:433603] [1:0x7ff261e16b00],连接:__posix_open_file,667:/data/db/WiredTiger.wt:句柄打开:打开:不允许操作
2020-06-12T12:49:11.433+0000 E STORAGE [initandlisten] WiredTiger error (1) [1591966151:433603][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1591966151:433603][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2020-06-12T12:49:11.448 + 0000 E存储[initandlisten] WiredTiger错误(17)[1591966151:448092] [1:0x7ff261e16b00 ],连接:__posix_open_file,667:/data/db/WiredTiger.wt:句柄打开:打开:文件存在原始:[1591966151:448092] [1:0x7ff261e16b00],c连接:__posix_open_file,667:/data/db/WiredTiger.wt:打开处理:打开:文件存在
2020-06-12T12:49:11.448+0000 E STORAGE [initandlisten] WiredTiger error (17) [1591966151:448092][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1591966151:448092][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists
2020-06-12T12:49:11.473 + 0000 I存储[initandlisten] WiredTiger消息意外文件WiredTiger.wt已找到,重命名为WiredTiger.wt.13234
2020-06-12T12:49:11.473+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.13234
2020-06-12T12:49:11.475 + 0000 E存储[initandlisten ] WiredTiger错误(1)[1591966151:475038] [1:0x7ff261e16b00],连接:__posix_open_file,667:/data/db/WiredTiger.wt:处理打开:打开:不允许操作Raw:[1591966151:475038] [1 :0x7ff261e16b00],连接:__posix_open_file,667:/data/db/WiredTiger.wt:处理打开:打开:不允许操作
2020-06-12T12:49:11.475+0000 E STORAGE [initandlisten] WiredTiger error (1) [1591966151:475038][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1591966151:475038][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2020-06-12T12:49 :11.477 + 0000 W存储[initandlisten]无法在任何兼容版本下启动WiredTiger。
2020-06-12T12:49:11.477+0000 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2020-06-12T12:49:11.477 + 0000 F存储[initandlisten]原因:1:不允许操作
2020-06-12T12:49:11.477+0000 F STORAGE [initandlisten] Reason: 1: Operation not permitted
2020-06-12T12:49:11.477 + 0000 F-[initandlisten]致命断言28595,位于src / mongo / db / st orage / wiredtiger / wiredtiger_kv_engine.cpp 915
2020-06-12T12:49:11.477+0000 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 915
有人知道如何解决这个问题吗?
Does anyone know how to resolve this?
谢谢
Paul
推荐答案
对我来说,这样的docker-compose.yml使得mongo开始工作:
As for me, such docker-compose.yml makes mongo start working:
version: '3.3'
services:
mongodb:
image: mongo
container_name: mongodb
volumes:
- mongodata:/data/db
ports:
- 27017:27017
volumes:
mongodata:
这篇关于无法使用Linux文件系统在Docker中为Windows运行mongoDb容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!