由于WiredTiger相关错误,MongoDB不断崩溃

时间:2020-09-19 10:22:14

标签: mongodb docker docker-compose

我已经使用Flask和MongoDB设置了一个Docker容器来制作Web服务。但是,当需要设置MongoDB时,此错误不断出现:

    android:ellipsize="marquee"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:freezesText="true"
    android:marqueeRepeatLimit="marquee_forever"
    android:paddingStart="5dp"
    android:paddingEnd="5dp"
    android:scrollHorizontally="true"
    android:singleLine="true"

作为参考,这是我的mongodb | {"t":{"$date":"2020-09-19T10:04:23.524+00:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"} mongodb | {"t":{"$date":"2020-09-19T10:04:23.526+00:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"} mongodb | {"t":{"$date":"2020-09-19T10:04:23.526+00:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."} mongodb | {"t":{"$date":"2020-09-19T10:04:23.527+00:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"d77da017e32d"}} mongodb | {"t":{"$date":"2020-09-19T10:04:23.527+00:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.0","gitVersion":"563487e100c4215e2dce98d0af2a6a5a2d67c5cf","openSSLVersion":"OpenSSL 1.1.1 11 Sep 2018","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu1804","distarch":"x86_64","target_arch":"x86_64"}}}} mongodb | {"t":{"$date":"2020-09-19T10:04:23.527+00:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"18.04"}}} mongodb | {"t":{"$date":"2020-09-19T10:04:23.527+00:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"}}}} mongodb | {"t":{"$date":"2020-09-19T10:04:23.533+00:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=483M,session_max=33000,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,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.042+00:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":17,"message":"[1600509864:42697][1:0x7f1f6ebe4a80], connection: __posix_open_file, 806: /data/db/WiredTiger.wt: handle-open: open: File exists"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.046+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.30"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.050+00:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":1,"message":"[1600509864:50093][1:0x7f1f6ebe4a80], connection: __posix_open_file, 806: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.074+00:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":17,"message":"[1600509864:74624][1:0x7f1f6ebe4a80], connection: __posix_open_file, 806: /data/db/WiredTiger.wt: handle-open: open: File exists"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.079+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.31"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.083+00:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":1,"message":"[1600509864:83783][1:0x7f1f6ebe4a80], connection: __posix_open_file, 806: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.111+00:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":17,"message":"[1600509864:111131][1:0x7f1f6ebe4a80], connection: __posix_open_file, 806: /data/db/WiredTiger.wt: handle-open: open: File exists"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.116+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.32"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.121+00:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":1,"message":"[1600509864:121046][1:0x7f1f6ebe4a80], connection: __posix_open_file, 806: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.123+00:00"},"s":"W", "c":"STORAGE", "id":22347, "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."} mongodb | {"t":{"$date":"2020-09-19T10:04:24.123+00:00"},"s":"F", "c":"STORAGE", "id":28595, "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"1: Operation not permitted"}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.123+00:00"},"s":"F", "c":"-", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":1100}} mongodb | {"t":{"$date":"2020-09-19T10:04:24.123+00:00"},"s":"F", "c":"-", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"} mongodb exited with code 14

docker-compose

由于我总是重新启动它,所以数据库自然会这样做,但是我无法确切地知道如何解决此问题。通过阅读错误,似乎权限或WiredTiger安装存在问题。这还会产生许多零字节的version: '2' services: mongodb: image: mongo restart: always container_name: mongodb ports: - 27017:27017 volumes: - ./mongodb/data:/data/db flask-service: build: context: ./flask restart: always container_name: flask depends_on: - mongodb ports: - 5000:5000 environment: - "MONGO_HOSTNAME=mongodb" 文件,每次尝试一个。

这也是Dockerfile:

WiredTiger.wt.#

1 个答案:

答案 0 :(得分:0)

简单的答案

brew uninstall mongodb-community

brew install mongodb-community@4.2

brew services start mongodb-community@4.2

更多

请参考其他帖子的答案:1, 2