有人可以帮助我吗?我有在mongobd和node.js上具有后端的dockers文件和项目。我读了很多文章,但找不到解决该问题的答案。 mongo-cnt容器无法启动并显示:
Error message (] WiredTiger error (1) [1573219560:340726][1:0x7fc183f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1573219560:340726][1:0x7fc1
83f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted)
。另外,我必须在Windows10上启动此项目。 我用于工作docker-desktop(版本2.1.0.4)。 请查看这2个文件和日志。
docker-compose.sh:
retryOnErr() {
until $1 2>&1 > /dev/null
do
echo "Try again ..."
sleep 2
done
}
docker-compose down --remove-orphans --volumes
rm -rf ./data
docker-compose up -d --force-recreate --build --renew-anon-volumes
echo "Waiting for mongo bring up..."
retryOnErr "docker exec -it mongo-cnt mongo --eval 'rs.status()'"
echo "Mongo is UP ..."
docker exec -it mongo-cnt mongo --eval 'rs.initiate({_id:"rs0", members:[{_id:0, host:"mongors:27017"}]});'
docker-compose restart auditsvc
docker-compose restart parsersvc
docker-compose.yml:
版本:“ 3.7”
services:
mongors:
hostname: mongors
image: mongors-img
build: ./mongo-db/
container_name: mongo-cnt
restart: on-failure
ports:
- 27017:27017
volumes:
#- ./data:/data/db
- mongodata:/data/db
- ./mongo-db/mongod.conf:/etc/mongod.conf
- ./mongo-db/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh
- ./minuteMedia.postman_collection.json:/minuteMedia.postman_collection.json
command: ["--config", "/etc/mongod.conf"]
auditsvc:
image: auditsvc-img
build: ./audit-service/
container_name: auditsvc-cnt
ports:
- 5000:5000
- 5858:5858
depends_on:
- mongors
auditui:
image: auditui-img
build: ./audit-ui/
container_name: auditui-cnt
volumes:
- ./audit-ui/nginx-react.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
depends_on:
- mongors
parsersvc:
image: parser-img
build: ./parser/
container_name: parser-cnt
volumes:
- ./out:/app/out
depends_on:
- mongors
并记录:
mongo-cnt | 2019-11-08T13:25:59.807+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=478M,cache_overflow=(file_max=0M),session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=t
rue,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
mongo-cnt | 2019-11-08T13:26:00.323+0000 E STORAGE [initandlisten] WiredTiger error (17) [1573219560:323308][1:0x7fc183f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1573219560:323308][1:0x7fc183f0fb00],
connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: File exists
mongo-cnt | 2019-11-08T13:26:00.325+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.162
mongo-cnt | 2019-11-08T13:26:00.326+0000 E STORAGE [initandlisten] WiredTiger error (1) [1573219560:326230][1:0x7fc183f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1573219560:326230][1:0x7fc1
83f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
mongo-cnt | 2019-11-08T13:26:00.337+0000 E STORAGE [initandlisten] WiredTiger error (17) [1573219560:337480][1:0x7fc183f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1573219560:337480][1:0x7fc183f0fb00],
connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: File exists
mongo-cnt | 2019-11-08T13:26:00.339+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.163
mongo-cnt | 2019-11-08T13:26:00.340+0000 E STORAGE [initandlisten] WiredTiger error (1) [1573219560:340726][1:0x7fc183f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1573219560:340726][1:0x7fc1
83f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
mongo-cnt | 2019-11-08T13:26:00.351+0000 E STORAGE [initandlisten] WiredTiger error (17) [1573219560:351210][1:0x7fc183f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1573219560:351210][1:0x7fc183f0fb00],
connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: File exists
mongo-cnt | 2019-11-08T13:26:00.353+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.164
mongo-cnt | 2019-11-08T13:26:00.354+0000 E STORAGE [initandlisten] WiredTiger error (1) [1573219560:354694][1:0x7fc183f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1573219560:354694][1:0x7fc1
83f0fb00], connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
mongo-cnt | 2019-11-08T13:26:00.356+0000 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
mongo-cnt | 2019-11-08T13:26:00.356+0000 F STORAGE [initandlisten] Reason: 1: Operation not permitted
mongo-cnt | 2019-11-08T13:26:00.356+0000 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 786
mongo-cnt | 2019-11-08T13:26:00.356+0000 F - [initandlisten]
mongo-cnt |
mongo-cnt | ***aborting after fassert() failure
mongo-cnt |
mongo-cnt |
谢谢您的关注!