Mongodb container keeps restarting

i’m trying to make tutor local launch
the platform is not working well and mongodb container keeps restarting
here is logs of mongodb container:

tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:02:50.746+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.7","gitVersion":"cfb08e1ab7ef741b4abdd0638351b322514c45bd","openSSLVersion":"OpenSSL 3.0.2 15 Mar 2022","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2204","distarch":"x86_64","target_arch":"x86_64"}}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:02:50.746+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"22.04"}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:02:50.746+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"},"storage":{"engine":"wiredTiger"}}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:02:50.759+00:00"},"s":"F",  "c":"STORAGE",  "id":50922,   "ctx":"initandlisten","msg":"An incomplete repair has been detected! This is likely because a repair operation unexpectedly failed before completing. MongoDB will not start up again without --repair."}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:02:50.759+00:00"},"s":"F",  "c":"ASSERT",   "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":50922,"file":"src/mongo/db/storage/storage_engine_init.cpp","line":106}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:02:50.759+00:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.219+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'"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.221+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.221+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."}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.222+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.222+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.222+00:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.222+00:00"},"s":"I",  "c":"TENANT_M", "id":7091600, "ctx":"main","msg":"Starting TenantMigrationAccessBlockerRegistry"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.223+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":"951d59a5053d"}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.223+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.7","gitVersion":"cfb08e1ab7ef741b4abdd0638351b322514c45bd","openSSLVersion":"OpenSSL 3.0.2 15 Mar 2022","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2204","distarch":"x86_64","target_arch":"x86_64"}}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.223+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"22.04"}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.223+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"},"storage":{"engine":"wiredTiger"}}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.235+00:00"},"s":"F",  "c":"STORAGE",  "id":50922,   "ctx":"initandlisten","msg":"An incomplete repair has been detected! This is likely because a repair operation unexpectedly failed before completing. MongoDB will not start up again without --repair."}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.235+00:00"},"s":"F",  "c":"ASSERT",   "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":50922,"file":"src/mongo/db/storage/storage_engine_init.cpp","line":106}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:03:51.235+00:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.022+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'"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.031+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.031+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."}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.032+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.032+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.032+00:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.032+00:00"},"s":"I",  "c":"TENANT_M", "id":7091600, "ctx":"main","msg":"Starting TenantMigrationAccessBlockerRegistry"}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.033+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":"951d59a5053d"}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.033+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.7","gitVersion":"cfb08e1ab7ef741b4abdd0638351b322514c45bd","openSSLVersion":"OpenSSL 3.0.2 15 Mar 2022","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2204","distarch":"x86_64","target_arch":"x86_64"}}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.033+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"22.04"}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.033+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"},"storage":{"engine":"wiredTiger"}}}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.054+00:00"},"s":"F",  "c":"STORAGE",  "id":50922,   "ctx":"initandlisten","msg":"An incomplete repair has been detected! This is likely because a repair operation unexpectedly failed before completing. MongoDB will not start up again without --repair."}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.054+00:00"},"s":"F",  "c":"ASSERT",   "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":50922,"file":"src/mongo/db/storage/storage_engine_init.cpp","line":106}}
tutor_local-mongodb-1        | {"t":{"$date":"2024-07-01T13:04:52.054+00:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}```

Which Tutor version are you using? If it’s the latest Redwood Tutor version, your MongoDB version should be MongoDB v7.0.7.

did you run tutor local upgrade --from=quince? MongoDB was upgraded in Tutor v18 and it needs to follow a proper upgrade path to work properly.

i can’t do upgrade, becouse i’m getting an error

C:\Users\nw-bi-run>tutor local upgrade --from=quince
⚠️  This command only performs a partial upgrade of your Open edX platform. To perform a full upgrade, you should run `tutor local launch` (or `tutor dev launch` in development).
=====================================
        Upgrading from Quince
=====================================
============================================
        Upgrading MongoDb to v5.0.26
============================================
Environment generated in C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env
docker compose -f 'C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\local\docker-compose.yml' -f 'C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\dev\docker-compose.yml' --project-name tutor_dev stop
docker compose -f 'C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\local\docker-compose.yml' -f 'C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\local\docker-compose.prod.yml' --project-name tutor_local up --remove-orphans -d mongodb
[+] Running 2/2
 ✔ Container tutor_local-permissions-1  Started                                                                    0.7s
 ✔ Container tutor_local-mongodb-1      Running                                                                    0.0s
Waiting for mongodb to boot...
docker compose -f 'C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\local\docker-compose.yml' -f 'C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\local\docker-compose.prod.yml' --project-name tutor_local exec mongodb mongo --eval 'db.adminCommand({'"'"'setFeatureCompatibilityVersion'"'"': '"'"'5.0'"'"'})'
MongoDB shell version v5.0.26
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:372:17
@(connect):2:6
exception: connect failed
exiting with code 1
Error: Command failed with status 1: docker compose -f C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\local\docker-compose.yml -f C:\Users\nw-bi-run\AppData\Local\tutor\tutor\env\local\docker-compose.prod.yml --project-name tutor_local exec mongodb mongo --eval db.adminCommand({'setFeatureCompatibilityVersion': '5.0'})

i’m using tutor, version 18.1.0

From which version of Tutor are you upgrading? The error logs suggest a connection issue with the MongoDB container.

from 17.0.3

Right. As mentioned above, the error logs seem to be the connection issue. Try running it once or twice and ensure the mongoDB container is up and running.