Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongodb docker container issue on WSL #43

Closed
JenySadadia opened this issue Dec 6, 2021 · 1 comment · Fixed by #45
Closed

Mongodb docker container issue on WSL #43

JenySadadia opened this issue Dec 6, 2021 · 1 comment · Fixed by #45
Assignees

Comments

@JenySadadia
Copy link
Collaborator

Issue :

Received below error when tried to start mongo db container on WSL.

Starting kernelci-db ... done
Attaching to kernelci-db
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.100+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.100+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'"}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.100+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.100+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."}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.101+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.101+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.101+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.102+00:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"5d485e17418e"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.102+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"5.0.3","gitVersion":"657fea5a61a74d7a79df7aff8e4bcf0bc742b748","openSSLVersion":"OpenSSL 1.1.1f  31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.102+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.102+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"}}}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.105+00:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=2519M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.593+00:00"},"s":"E",  "c":"STORAGE",  "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":17,"message":"[1638788064:593591][1:0x7f1b881e4c80], connection: __posix_open_file, 805: /data/db/WiredTiger.wt: handle-open: open: File exists"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.602+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.24"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.603+00:00"},"s":"E",  "c":"STORAGE",  "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":1,"message":"[1638788064:603798][1:0x7f1b881e4c80], connection: __posix_open_file, 805: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.618+00:00"},"s":"E",  "c":"STORAGE",  "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":17,"message":"[1638788064:618150][1:0x7f1b881e4c80], connection: __posix_open_file, 805: /data/db/WiredTiger.wt: handle-open: open: File exists"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.627+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.25"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.628+00:00"},"s":"E",  "c":"STORAGE",  "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":1,"message":"[1638788064:628488][1:0x7f1b881e4c80], connection: __posix_open_file, 805: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.641+00:00"},"s":"E",  "c":"STORAGE",  "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":17,"message":"[1638788064:641047][1:0x7f1b881e4c80], connection: __posix_open_file, 805: /data/db/WiredTiger.wt: handle-open: open: File exists"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.650+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.26"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.651+00:00"},"s":"E",  "c":"STORAGE",  "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":1,"message":"[1638788064:651161][1:0x7f1b881e4c80], connection: __posix_open_file, 805: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.652+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."}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.652+00:00"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"1: Operation not permitted"}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.652+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":690}}
kernelci-db | {"t":{"$date":"2021-12-06T10:54:24.652+00:00"},"s":"F",  "c":"-",        "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
kernelci-db exited with code 14

Root cause:
As per the answer of mongodb github issue #docker-library/mongo#232 (comment) , We can not use shared memory for mongodb docker container and WSL uses VM to host the Docker daemon.

Solution:
We need to create a separate docker volume to build mongodb container.

Below is the docker-compose.yaml which can be used to build db container successfully:

version: '3'
services:

  db:
    container_name: 'kernelci-db'
    image: 'mongo:5.0'
    volumes:
      - mongodata:/data/db

volumes:
  mongodata:

Refernce URLs:

https://stackoverflow.com/questions/54911021/unable-to-start-docker-mongo-image-on-windows
docker-library/mongo#74

@JenySadadia
Copy link
Collaborator Author

Hi @gctucker,
I have initiated PR #45 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants