Closed bruceborrett closed 5 months ago
likely related to #732.
did you already try removing the mentioned binary and letting it re-download? (/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4
)
in addition, also try to use a newer binary than 6.0.4
, like the default 6.0.9
or the (currently) latest 6.0.13
@hasezoey using 6.0.13 works! thank you so much for the suggestion
Versions
package: mongodb-memory-server
What is the Problem?
When trying to run Jest with mongodb-memory-server, I get the following error:
Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1"
This is a well known issue and apparently it should have been resolved as of MongoDB version 6.0.3 but I am still experiencing this.
Debug Output
Debug Output
```txt MongoMS:ResolveConfig Debug Mode Enabled, through Environment Variable +0ms MongoMS:ResolveConfig findPackageJson: Found package.json at "/home/bruce/Projects/*********/package.json" +1ms MongoMS:MongoMemoryServer Mongo[unknown]: start: Called .start() method +0ms MongoMS:MongoMemoryServer Mongo[unknown]: _startUpInstance: Called MongoMemoryServer._startUpInstance() method +0ms MongoMS:MongoMemoryServer Mongo[unknown]: getStartOptions: forceSamePort: false +0ms MongoMS:DryMongoBinary generateOptions +0ms MongoMS:utils tryReleaseFile: "/etc/upstream-release/lsb-release" does not exist +0ms MongoMS:getos getLinuxInformation: Using etcOsRelease +0ms MongoMS:DryMongoBinary generateDownloadPath: Generating Download Path, preferGlobal: "true" +3ms MongoMS:DryMongoBinary generatePaths { version: '6.0.4', downloadDir: '', os: { os: 'linux', dist: 'ubuntu', codename: 'jammy', release: '22.04', id_like: [ 'debian' ] }, platform: 'linux', arch: 'x64', systemBinary: '' } +0ms MongoMS:DryMongoBinary getBinaryName +2ms MongoMS:DryMongoBinary combineBinaryName +1ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary generateDownloadPath: Paths: { homeCache: '/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4', modulesCache: '/home/bruce/*********/node_modules/.cache/mongodb-memory-server/mongod-x64-ubuntu-6.0.4', relative: '/home/bruce/*********/mongodb-binaries/mongod-x64-ubuntu-6.0.4', resolveConfig: '' } +0ms MongoMS:DryMongoBinary generateDownloadPath: Found binary in homeCache: "/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4" +1ms MongoMS:GetPort EXP_NET0LISTEN false +0ms MongoMS:MongoMemoryServer Mongo[unknown]: _startUpInstance: Creating new MongoDB instance with options: { instance: { port: 4274, dbName: '', ip: '127.0.0.1', storageEngine: 'ephemeralForTest', replSet: undefined, dbPath: '/tmp/mongo-mem-Xkthtp', tmpDir: '/tmp/mongo-mem-Xkthtp', keyfileLocation: undefined, launchTimeout: undefined, args: undefined, auth: false }, binary: { version: '6.0.4' }, spawn: undefined } +14ms MongoMS:MongoInstance create: Called .create() method +0ms MongoMS:MongoInstance Mongo[4274]: start +0ms MongoMS:MongoBinary getPath +0ms MongoMS:DryMongoBinary generateOptions +9ms MongoMS:DryMongoBinary generateDownloadPath: Generating Download Path, preferGlobal: "true" +0ms MongoMS:DryMongoBinary generatePaths { version: '6.0.4', downloadDir: '', os: { os: 'linux', dist: 'ubuntu', codename: 'jammy', release: '22.04', id_like: [ 'debian' ] }, platform: 'linux', arch: 'x64', systemBinary: '' } +0ms MongoMS:DryMongoBinary getBinaryName +1ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary generateDownloadPath: Paths: { homeCache: '/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4', modulesCache: '/home/bruce/*********/node_modules/.cache/mongodb-memory-server/mongod-x64-ubuntu-6.0.4', relative: '/home/bruce/*********/mongodb-binaries/mongod-x64-ubuntu-6.0.4', resolveConfig: '' } +0ms MongoMS:DryMongoBinary generateDownloadPath: Found binary in homeCache: "/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4" +0ms MongoMS:MongoBinary getPath: MongoBinary options: { "version": "6.0.4", "downloadDir": "/home/bruce/.cache/mongodb-binaries", "os": { "os": "linux", "dist": "ubuntu", "codename": "jammy", "release": "22.04", "id_like": [ "debian" ] }, "platform": "linux", "arch": "x64", "systemBinary": "", "checkMD5": true } +2ms MongoMS:DryMongoBinary locateBinary: Trying to locate Binary for version "6.0.4" +1ms MongoMS:DryMongoBinary generateOptions +0ms MongoMS:DryMongoBinary generateDownloadPath: Generating Download Path, preferGlobal: "true" +0ms MongoMS:DryMongoBinary generatePaths { version: '6.0.4', downloadDir: '/home/bruce/.cache/mongodb-binaries', os: { os: 'linux', dist: 'ubuntu', codename: 'jammy', release: '22.04', id_like: [ 'debian' ] }, platform: 'linux', arch: 'x64', systemBinary: '' } +0ms MongoMS:DryMongoBinary getBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary generatePaths: resolveConfigValue is not empty +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary generateDownloadPath: Paths: { homeCache: '/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4', modulesCache: '/home/bruce/*********/node_modules/.cache/mongodb-memory-server/mongod-x64-ubuntu-6.0.4', relative: '/home/bruce/*********/mongodb-binaries/mongod-x64-ubuntu-6.0.4', resolveConfig: '/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4' } +0ms MongoMS:DryMongoBinary generateDownloadPath: Found binary in resolveConfig (DOWNLOAD_DIR): "/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4" +0ms MongoMS:DryMongoBinary locateBinary: running generateDownloadPath +0ms MongoMS:DryMongoBinary generateDownloadPath: Generating Download Path, preferGlobal: "true" +0ms MongoMS:DryMongoBinary generatePaths { version: '6.0.4', downloadDir: '/home/bruce/.cache/mongodb-binaries', os: { os: 'linux', dist: 'ubuntu', codename: 'jammy', release: '22.04', id_like: [ 'debian' ] }, platform: 'linux', arch: 'x64', systemBinary: '' } +0ms MongoMS:DryMongoBinary getBinaryName +1ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary generatePaths: resolveConfigValue is not empty +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary combineBinaryName +0ms MongoMS:DryMongoBinary generateDownloadPath: Paths: { homeCache: '/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4', modulesCache: '/home/bruce/*********/node_modules/.cache/mongodb-memory-server/mongod-x64-ubuntu-6.0.4', relative: '/home/bruce/*********/mongodb-binaries/mongod-x64-ubuntu-6.0.4', resolveConfig: '/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4' } +0ms MongoMS:DryMongoBinary generateDownloadPath: Found binary in resolveConfig (DOWNLOAD_DIR): "/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4" +0ms MongoMS:DryMongoBinary locateBinary: found binary at "/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4" +0ms MongoMS:MongoBinary getPath: Mongod binary path: "/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4" +1ms MongoMS:MongoInstance Mongo[4274]: start: Starting Processes +5ms MongoMS:MongoInstance Mongo[4274]: _launchMongod: Launching Mongod Process +0ms MongoMS:MongoInstance Mongo[4274]: prepareCommandArgs +0ms MongoMS:MongoInstance Mongo[4274]: prepareCommandArgs: final argument array:["--port","4274","--dbpath","/tmp/mongo-mem-Xkthtp","--storageEngine","ephemeralForTest","--bind_ip","127.0.0.1","--noauth"] +0ms MongoMS:MongoInstance Mongo[4274]: _launchKiller: Launching Killer Process (parent: 731872, child: 731895) +3ms MongoMS:MongoInstance Mongo[4274]: stderrHandler: ""/home/bruce/.cache/mongodb-binaries/mongod-x64-ubuntu-6.0.4: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory"" +2ms MongoMS:MongoInstance Mongo[4274]: constructor: Instance has thrown an Error: Error: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" +1ms MongoMS:MongoInstance Mongo[4274]: stop +0ms MongoMS:utils Mongo[4274] killProcess: mongodProcess: sending "SIGINT" +25ms MongoMS:MongoMemoryServer Mongo[unknown]: _startUpInstance threw a Error: StdoutInstanceError: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" at MongoInstance.checkErrorInLine (/home/bruce/*********/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:390:62) at MongoInstance.stderrHandler (/home/bruce/*********/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:316:14) at Socket.emit (node:events:517:28) at addChunk (node:internal/streams/readable:368:12) at readableAddChunk (node:internal/streams/readable:341:9) at Readable.push (node:internal/streams/readable:278:10) at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) +13ms MongoMS:MongoMemoryServer Mongo[unknown]: stop: Called .stop() method +1ms MongoMS:MongoMemoryServer Mongo[unknown]: stop: "instanceInfo" is not defined (never ran?) +0ms Error: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" at MongoInstance.checkErrorInLine (/home/bruce/*********/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:390:62) at MongoInstance.stderrHandler (/home/bruce/*********/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:316:14) at Socket.emit (node:events:517:28) at addChunk (node:internal/streams/readable:368:12) at readableAddChunk (node:internal/streams/readable:341:9) at Readable.push (node:internal/streams/readable:278:10) at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) ```Do you know why it happens?
no