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

Cannot install package with default version in debian 10 (buster) #282

Closed
strimpak opened this issue Mar 12, 2020 · 12 comments
Closed

Cannot install package with default version in debian 10 (buster) #282

strimpak opened this issue Mar 12, 2020 · 12 comments
Labels
Module: Version-String Generation This problem is because of the Version-String Generation (MongoBinaryDownloadUrl) question

Comments

@strimpak
Copy link

strimpak commented Mar 12, 2020

Versions

  • NodeJS: 10.19.0
  • mongodb-memory-server-: 6.3.
  • mongodb: 0.0.0
  • mongoose: ~5.5.12
  • system: Debian 10 (buster)

package: mongo-memory-server

What is the Problem?

Code Example

mongo-memory-server: 6.3.3

root@4ffaf5073597:/app# npm install
npm WARN deprecated @types/get-port@4.2.0: This is a stub types definition. get-port provides its own type definitions, so you do not need this installed.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.

> mongodb-memory-server@6.3.3 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

> mongodb-memory-server@6.3.2 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/get-port@4.2.0: This is a stub types definition. get-port provides its own type definitions, so you do not need this installed.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.

> mongodb-memory-server@6.3.1 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/get-port@4.2.0: This is a stub types definition. get-port provides its own type definitions, so you do not need this installed.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.

> mongodb-memory-server@6.3.0 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: #204

Do you know why it happenes?

no

@strimpak strimpak added the bug label Mar 12, 2020
@hasezoey
Copy link
Member

@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-)

@strimpak
Copy link
Author

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();
}

@hasezoey
Copy link
Member

@strimpak yes latest is an valid version

could you provide the debug log? (https://github.com/nodkz/mongodb-memory-server#enable-debug-mode)

@strimpak
Copy link
Author

(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]

@strimpak
Copy link
Author

running apt-get install libcurl4 solves the issues

@hasezoey
Copy link
Member

@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 👍


@strimpak as an final question, was it infinitely running or did it exit when the error occured? (the nodejs process)

@strimpak
Copy link
Author

strimpak commented Mar 12, 2020

@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.

@hasezoey
Copy link
Member

thanks for letting me know, i still try to pin down where this "infinitely running" issue is

@hasezoey hasezoey added Module: Version-String Generation This problem is because of the Version-String Generation (MongoBinaryDownloadUrl) question and removed bug labels Mar 12, 2020
@strimpak
Copy link
Author

@hasezoey could you please elaborate a bit more on your statement be careful, you cant have 3 and 4 installed at the same time

@hasezoey
Copy link
Member

@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)

@gregbacchus
Copy link

This problem is easily reproduced in the docker image node:14-buster just by running npm i mongodb-memory-server

@hasezoey hasezoey changed the title Cannot install successfully module in debian buster Cannot install package with default version in debian 10 (buster) Aug 21, 2020
@hasezoey
Copy link
Member

hasezoey commented Sep 7, 2020

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

@hasezoey hasezoey closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Version-String Generation This problem is because of the Version-String Generation (MongoBinaryDownloadUrl) question
Projects
None yet
Development

No branches or pull requests

3 participants