Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

fails to start in circleci node docker image #61

Open
beatthat opened this issue Dec 17, 2019 · 3 comments
Open

fails to start in circleci node docker image #61

beatthat opened this issue Dec 17, 2019 · 3 comments

Comments

@beatthat
Copy link

beatthat commented Dec 17, 2019

Mongo installed y mongo-prebuilt into any recent circleci/node docker image will fail to start with missing shared objects.

STEPS

  1. run the docker image as a shell
docker run --rm -it  --entrypoint /bin/bash --workdir /test circleci/node:12.13
  1. Install mongod-prebuilt
sudo npm install -g mongodb-prebuilt
  1. Run mongod
mongod

EXPECTED

Mongo starts successfully

ACTUAL

Fails to start with this error about unable to load libcrypto.so.1.0.0:

/home/circleci/.mongodb-prebuilt/mongodb-download/aa7220af5e9371f6c91e884d508c10a0/mongodb-linux-x86_64-debian81-4.1.10-425-g3b00dc3/bin/mongod: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

With a little more digging, the installed version of all things libssl seems to be 1.0.2, e.g.

sudo find / -name "libcrypto*"

/usr/lib/x86_64-linux-gnu/pkgconfig/libcrypto.pc
/usr/lib/x86_64-linux-gnu/libcrypto.a
/usr/lib/x86_64-linux-gnu/libcrypto.so
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2

...and here is the linux version info for circleci/node:12.13

circleci@48541f4403be:~$ lsb_release -a

No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.11 (stretch)
Release:	9.11
Codename:	stretch

For context, what I'm trying to do is run tests using mongo-unit, which in turn seems to be starting a local mongo instance using mongod-prebuilt. My tests work on my mac laptop, but fail to run at all on circleci, and with digging it seems like this is the cause.

@josemontesp
Copy link

Have you found a workaround for this? I'm having the same issue in Circle CI, and also Gitpod.

@josemontesp
Copy link

I ran it passing the debug env flag. This is what I got in the console

  mongodb-prebuilt bin path: /workspace/poster-house-api/src/node_modules/mongodb-prebuilt/dist/3.2.0/bin/ +5s
/workspace/poster-house-api/src/node_modules/mongodb-prebuilt/dist/3.2.0/bin/
  mongodb-prebuilt spawn /workspace/poster-house-api/src/node_modules/mongodb-prebuilt/dist/3.2.0/bin/mongod --storageEngine ephemeralForTest --bind_ip 127.0.0.1 --port 8000 --dbpath /workspace/poster-house-api/src/node_modules/mongo-in-memory/.data-11qe4ts +2ms
  mongodb-prebuilt child process exited with code 127

@beatthat
Copy link
Author

Have you found a workaround for this? I'm having the same issue in Circle CI, and also Gitpod.

Yes, in our case, the underlying fix was to switch from mongo-prebuilt to mongodb-memory-server, which works and is more actively maintained.

We were using mongo-prebuilt only indirectly through use of mongo-unit, so I reported the issue there and then PR'ed this fix, which has since been merged and released.

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

No branches or pull requests

2 participants