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

doesn't seem to work #4

Open
mindplay-dk opened this issue Aug 29, 2023 · 6 comments · May be fixed by #5
Open

doesn't seem to work #4

mindplay-dk opened this issue Aug 29, 2023 · 6 comments · May be fixed by #5

Comments

@mindplay-dk
Copy link

Environment

$ lsb_release -d
Description:    Ubuntu 22.04.2 LTS
$ node -v
v18.17.1
$ npm -v
9.8.1

Reproduction

git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat
npm ci
npx concurrently 'npx mongoz' 'npm run backend'

Describe the bug

npx mongoz appears to always exit immediately with exit code 0.

it will print Starting mongo at port 27017 but then just exits.

Additional context

image

Logs

$ cat /tmp/mongo/logs/default/mongo/logs.txt
/tmp/mongo/source/mongo/4.4.2/linux/unpacked/bin/mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

looks like a missing dependency?

similar issue here:

journeyapps/node-sqlcipher#101

I'm guessing mongo itself is actually exiting with an error status? But somehow the error message/status isn't making it to the console - this seems to happen also with just npx mongoz, so probably not related to concurrently.

I don't know most of the packages you use, so I can't really be of more help here, sorry.

@mindplay-dk
Copy link
Author

Possible answer here?

typegoose/mongodb-memory-server#732 (comment)

@mindplay-dk
Copy link
Author

oh, I see the problem - it's simply hard coded to a specific version that no longer works. 😅

https://github.com/unjs/mongoz/blob/cd762a7746c29de43516efb2e6f8d416a70bfbcb/src/formula.ts#L1-L21

here's a package that can look up the current URLs for downloads on different platforms:

https://www.npmjs.com/package/mongodb-download-url

what do you think?

@mindplay-dk
Copy link
Author

looks like that would work :-)

$ npx mongodb-download-url
Need to install the following packages:
[email protected]
Ok to proceed? (y) 
https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.0.tgz

@mindplay-dk
Copy link
Author

yep, looks like that fixed it - could you take a look at this PR please? 🙂

@blzzua
Copy link

blzzua commented Mar 27, 2024

on ubuntu 22.04 libcrypto.so.1.1:
You will need install this library.
As instance you can install this http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
( https://gist.github.com/joulgs/c8a85bb462f48ffc2044dd878ecaa786 )

the real cause of the problem is that ubuntu 22 no longer supports this version of the library, but the mongo client is compiled specifically for this version of the library. mongo-org thinks you will switch to another utility mongosh

@mindplay-dk
Copy link
Author

@blzzua I don't think this package is being maintained - but "the real cause of the problem" is this package installs the wrong binary. It only has a few hard coded binaries to choose from - I already submitted a PR to fix this, but it needs a merge and publish from the author.

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

Successfully merging a pull request may close this issue.

2 participants