package: mongo-memory-server
mongo-memory-server: 6.3.3
root@4ffaf5073597:/app# npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition. get-port provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
> [email protected] postinstall /app/node_modules/mongodb-memory-server
> node ./postinstall.js
mongodb-memory-server: checking MongoDB binaries cache...
failed to download/install MongoDB binaries. The error: Error: Status Code is 403 (MongoDB's 404)
This means that the requested version-platform combination dosnt exist
A note above is that a typo above exist in word dosnt
mongo-memory-server: 6.3.2
> [email protected] postinstall /app/node_modules/mongodb-memory-server
> node ./postinstall.js
mongodb-memory-server: checking MongoDB binaries cache...
failed to download/install MongoDB binaries. The error: Error: Status Code is 403 (MongoDB's 404)
This means that the requested version-platform combination dosnt exist
mongo-memory-server: 6.3.1
root@4ffaf5073597:/app# npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition. get-port provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
> [email protected] postinstall /app/node_modules/mongodb-memory-server
> node ./postinstall.js
mongodb-memory-server: checking MongoDB binaries cache...
failed to download/install MongoDB binaries. The error: Error: MongoBinaryDownload: missing mongod binary in /app/node_modules/.cache/mongodb-memory-server/mongodb-binaries/mongodb-linux-x86_64-debian10-4.0.3.tgz (downloaded from https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian10-4.0.3.tgz). Broken archive from MongoDB Provider?
mongo-memory-server: 6.3.0
root@4ffaf5073597:/app# npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition. get-port provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
> [email protected] postinstall /app/node_modules/mongodb-memory-server
> node ./postinstall.js
mongodb-memory-server: checking MongoDB binaries cache...
failed to download/install MongoDB binaries. The error: Error: MongoBinaryDownload: missing mongod binary in /app/node_modules/.cache/mongodb-memory-server/mongodb-binaries/mongodb-linux-x86_64-debian10-4.0.3.tgz (downloaded from https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian10-4.0.3.tgz). Broken archive from MongoDB Provider?
Also npm install does not exit with error code to identify that an issue exist.
Is there any relation with: https://github.com/nodkz/mongodb-memory-server/issues/204
no
@strimpak it has nothing todo with #204, because that issue was about when starting the instance that it couldnt find OpenSSL 3 (probably having OpenSSL 4 installed)
this issue is about your requested version combination
i assume that you request the default version 4.0.3 for debian buster (debian10)?
when yes, an build for 4.0.3 dosnt exist for debian10 you will need to request 4.2.1+ (reference search for debian10-)
Hi @hasezoey
adding this in package.json:
"config": {
"mongodbMemoryServer": {
"version": "latest"
}
},
fixes this issue even in 6.3.3 but I stack in getConnectionString():
let mongoServer: MongoMemoryServer;
async function initializeMongo(): Promise<string> {
mongoServer = new MongoMemoryServer();
return await mongoServer.getConnectionString();
}
@strimpak yes latest is an valid version
could you provide the debug log? (https://github.com/nodkz/mongodb-memory-server#enable-debug-mode)
(node:1011) [changeLevelName_deprecation] Warning: The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.
2020-03-12T11:45:31.260Z MongoMS:MongoMemoryServer Called MongoMemoryServer.ensureInstance() method:
2020-03-12T11:45:31.261Z MongoMS:MongoMemoryServer - no running instance, call `start()` command
2020-03-12T11:45:31.261Z MongoMS:MongoMemoryServer Called MongoMemoryServer.start() method
{"Severity":"info","Timestamp":"2020-03-12T11:45:31.269Z","Category":"Application","Message":"Cache connected to: 127.0.0.1","v":1}
{"Severity":"info","Timestamp":"2020-03-12T11:45:31.270Z","Category":"Application","Message":"Cache ready","v":1}
2020-03-12T11:45:31.274Z MongoMS:MongoMemoryServer Starting MongoDB instance with following options: {"port":43167,"dbName":"5e6b3bd3-2c0f-4b16-86d7-4308edb76331","ip":"127.0.0.1","storageEngine":"ephemeralForTest","dbPath":"/tmp/mongo-mem-1011SDuuMfBIpcEZ","tmpDir":{"name":"/tmp/mongo-mem-1011SDuuMfBIpcEZ"},"uri":"mongodb://127.0.0.1:43167/5e6b3bd3-2c0f-4b16-86d7-4308edb76331?"}
2020-03-12T11:45:31.279Z MongoMS:MongoBinary MongoBinary options: {"downloadDir":"/app/node_modules/.cache/mongodb-memory-server/mongodb-binaries","platform":"linux","arch":"x64","version":"latest"}
2020-03-12T11:45:31.290Z MongoMS:MongoBinary MongoBinary: Mongod binary path: /app/node_modules/.cache/mongodb-memory-server/mongodb-binaries/latest/mongod
2020-03-12T11:45:32.439Z MongoMS:MongoInstance Mongo[43167]: Called MongoInstance._launchKiller(parent: 1011, child: 1022):
2020-03-12T11:45:32.454Z MongoMS:MongoBinary MongoBinary: Download lock removed
2020-03-12T11:45:32.464Z MongoMS:MongoInstance Mongo[43167]: STDERR: /app/node_modules/.cache/mongodb-memory-server/mongodb-binaries/latest/mongod: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
2020-03-12T11:45:32.466Z MongoMS:MongoInstance Mongo[43167]: CLOSE: 127
2020-03-12T11:45:37.641Z MongoMS:MongoInstance Mongo[43167]: [MongoKiller]: exit - [0,null]
running apt-get install libcurl4 solves the issues
@strimpak be careful, you cant have 3 and 4 installed at the same time, but if you havnt any, then good that it is fixed :+1:
@strimpak as an final question, was it infinitely running or did it exit when the error occured? (the nodejs process)
@hasezoey you made me feel worried about libcurl3-gnutls
Before installing:
root@061f42c5387c:/# dpkg -l | grep libcurl
ii libcurl3-gnutls:amd64 7.64.0-4+deb10u1 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
root@061f42c5387c:/#
After installing the libcurl4:
root@4ffaf5073597:/app# dpkg -l | grep libcurl
ii libcurl3-gnutls:amd64 7.64.0-4+deb10u1 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libcurl4:amd64 7.64.0-4+deb10u1 amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)
@hasezoey on your question we had a mocha timeout on 10 secs which returned, otherwise it would run infinitely.
thanks for letting me know, i still try to pin down where this "infinitely running" issue is
@hasezoey could you please elaborate a bit more on your statement be careful, you cant have 3 and 4 installed at the same time
@strimpak i had the problem where i had an application that needed libcurl4, and mongodb wanted libcurl3, and i couldnt have them installed at the same time (maybe i just took the wrong bin of mongodb at that time)
This problem is easily reproduced in the docker image node:14-buster just by running npm i mongodb-memory-server
closing because original issue got solved (4.0.3 not available for debian10)
-> in next major version it will be changed to latest / at least an newer version
Most helpful comment
Hi @hasezoey
adding this in package.json:
fixes this issue even in 6.3.3 but I stack in getConnectionString():