mongodb-memory-server: GenericMMSError: Instance failed to start within 10000ms
Versions
- NodeJS: 18.15.0
- mongodb-memory-server-*: ^8.13.0
- mongodb: 5.5.0,
- mongoose: 7.1.1
- system: Linux container (FROM --platform=linux/amd64 node:18.15.0)
- process.arch: x64
package: mongo-memory-server
What is your question?
when I write this following code
const mongod = await MongoMemoryServer.create();
const mongoUri = mongod.getUri();
I get the following error
Starting the MongoMemoryServer Instance failed, enable debug log for more information. Error:
GenericMMSError: Instance failed to start within 10000ms
at Timeout.<anonymous> (/opt/tbo/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:365:21)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7)
at MongoMemoryServer.<anonymous> (../node_modules/mongodb-memory-server-core/src/MongoMemoryServer.ts:293:17)
at ../node_modules/tslib/tslib.js:167:75
at __awaiter (../node_modules/tslib/tslib.js:163:16)
at ../node_modules/mongodb-memory-server-core/src/MongoMemoryServer.ts:284:68
Note: I am running docker container over m1 chip(arm64 processor).
how can I overcome these errors ?
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15
the ubuntu binaries can be used in a debian image from my knowledge
you should not use
amazon2
builds for ubuntuif you want to post it you can
Docs:
if the container you are running MMS in is arm64, then i dont know why the mongo container works but this not, maybe post the full debug log of when you are running a arm64 container with MMS and have
ARCHIVE_NAME
overwritten (orDOWNLOAD_URL
)Note: i dont have a ARM64 system to test this on (and also no mac)
i am pretty sure the template had some extra notes. assuming from the version
5.5.0
this is the driver not the binarya note to self: docker image
node:18.15.0
is based ondebian:11, 11.6, bullseye
docker currently shipped qemu version does not support AVX instructions, which mongodb requires since 5.0 (and mongodb-memory-server’s current default is a 5.x version), see https://github.com/nodkz/mongodb-memory-server/issues/710
this error should not happen and throw a actual error, could you post the full log of when this error occurs with debug logs enabled?
assuming you are using a mac with arm and running x86 docker, then your only options are: