I have a bitbucket pipeline setup with multiple steps.
The steps with 'unit tests' uses mongodb-memory-server to mock the mongodb.
The setup is as follows and this gets rid of the same error on ubuntu 2204 (libcrypt...)
But when i run in the pipeline i get the error.
Pipeline config:
Starting the MongoMemoryServer Instance failed, enable debug log for more information. Error:
StdoutInstanceError: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1"
at MongoInstance.checkErrorInLine (/opt/atlassian/pipelines/agent/build/node_modules/.pnpm/mongodb-memory-server-core@8.12.2/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:678:11)
at MongoInstance.stderrHandler (/opt/atlassian/pipelines/agent/build/node_modules/.pnpm/mongodb-memory-server-core@8.12.2/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:563:10)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Error: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1"
at MongoInstance.checkErrorInLine (/opt/atlassian/pipelines/agent/build/node_modules/.pnpm/mongodb-memory-server-core@8.12.2/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:678:11)
at MongoInstance.stderrHandler (/opt/atlassian/pipelines/agent/build/node_modules/.pnpm/mongodb-memory-server-core@8.12.2/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:563:10)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
ELIFECYCLE Command failed with exit code 1.
Hi @Tuomas Pesola and welcome to the community!
Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. For this specific step, the DockerHub image node:18 is used.
Every Docker image may use a different version of Linux and it may have different applications and libraries pre-installed. For example, the DockerHub image node:18 is using Debian 12 (bookworm).
If your build needs the library mentioned in the error message, you can either install it during the build or you can try using a different Docker image or a different tag of the node image that has this library.
You can debug this step locally with Docker and try different Docker images or execute additional commands until you have a step that works, before making any changes in your yml file:
Kind regards,
Theodora
Thanks!
I found something that works, but i am not sure how "kosher" it is :D
Found that by installing the libssl1.1 package directly from ubuntu archives works like a charm. (since ubuntu is debian based, i feel this should be ok).
Here is my current (working) pipeline step:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's good to hear Tuomas, thank you for sharing the solution here!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.