简体   繁体   中英

unable to run a mongoDb container in docker for windows using linux file system

I am trying to run a mongo db container in windows with a volume mapping to a windows folder.

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 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.13233

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 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 STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.13234

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 STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.

2020-06-12T12:49:11.477+0000 F STORAGE [initandlisten] Reason: 1: Operation not permitted

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?

Thanks

Paul

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:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM