Closed lyj711 closed 1 year ago
known issue, nothing MMS can do about - there are just no Ubuntu 2204 binaries yet, so MMS falls back to 2004 binaries, but those require OpenSSL 1.1, and Ubuntu 2204 only ships 3.x, so your options are:
see https://jira.mongodb.org/browse/SERVER-62300 TL;DR: they are planning to add a ubuntu 2204 binary for 6.0.4
*1 somehow in ubuntu APT archives, there are mongodb builds for ubuntu 2204, but no "official" mongodb builds (Official builds can be found here)
See also: https://github.com/shelfio/jest-mongodb/issues/408
I have mongodb running all over the place on 22.04 with docker.
Would it be possible to substitute the binary download for a docker command?
In my experience, mongodb is much more focused on their Atlas platform than the community editions, so this might be one of many future issues like this. I spent hours on a workaround but came up empty. I'm probably not the first. I saw someone else suggest packaging mongo with the library in a snap or appimage, but I don't know how to do that (or if it would work)
Here is a reproduction:
git clone git@github.com:renatops1991/clean-code-api.git
cd clean-code-api
npm install
npm run test
This will come at the issue through jest-mongo
Would it be possible to substitute the binary download for a docker command?
MMS is currently not build to use anything other than the direct binary, you currently have 2 options:
SYSTEM_BINARY
config option)i dont think MMS will add the ability to use anything other than the direct binary, though you could also just run MMS inside a container and let it use a binary there
update, there is now mongodb 6.0.4, which has a build for ubuntu 2204 (though that version is seemingly not documented yet)
:tada: This issue has been resolved in version 8.11.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Note: for now it still required to set a custom mongodb version with at least 6.0.4
(currently default for MMS 8.x
is still mongodb 5.0.x
, see config option VERSION
if someone needs 6.0.3 for any weird reason, i found that the .deb download contains a version which should work https://github.com/nodkz/mongodb-memory-server/issues/686#issuecomment-1370468664
Still facing the problem in GitLab node:lts
on GitLab CI (after setting export MONGOMS_VERSION=6.0.4
)-
Running with gitlab-runner 16.1.0~beta.5.gf131a6a2 (f131a6a2)
on green-5.shared.runners-manager.gitlab.com/default xS6Vzpvo, system ID: s_d878f787d8ea
feature flags: FF_USE_IMPROVED_URL_MASKING:true
Preparing the "docker+machine" executor
Using Docker executor with image node:lts ...
https://github.com/nodkz/mongodb-memory-server/issues/480#issuecomment-1488548395 fixed it for me for the time being.
docker image node:lts
is currently based on debian:12
there are currently no native binaries for debian 12, last being debian 11, i assume debian 12 changes the libcrypto version like ubuntu 22 did, maybe try to use the ubuntu 22 binary via config option ARCHIVE_NAME
(valid archive names can be found here, use the .tgz
archives)
Thanks, @hasezoey. I changed to node:lts-bullseye
and it worked.
This error is occurring for me too - trying to upgrade from Node.js v18.18.2 to v20.
NodeJS: 20.9.0
mongodb-memory-server-*: 9.1.1
mongodb(the binary version): 6.0.6
mongodb(the js package): 5.9.2
system: Ubuntu
does anyone have any ideas how to resolve this?
This error is occurring for me too - trying to upgrade from Node.js v18.18.2 to v20.
this issue has nothing to do with a nodejs version upgrade, if you have such issues, please open a new issue
This error is occurring for me too - trying to upgrade from Node.js v18.18.2 to v20.
this issue has nothing to do with a nodejs version upgrade, if you have such issues, please open a new issue
Many thanks for the quick reply. So it turns out the problem was somewhere else (CI) - the search results led me here though.
Versions
package: mongo-memory-server
What is the Problem?
When running 'pnpm test', following error occured:
Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1"
Code Example
Debug Output
Debug Output
```txt EventController › Should throw an error if event id is not valid Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" ```Do you know why it happenes?
no