coffee-tools / folgore

Universal Bitcoin backend for core lightning with BIP 157 support full based on the btcli4j Kotlin plugin! Ah, yes it is written in Rust
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

Running folgore in Core Lightning docker environment results in openssl version issue #94

Closed lightningcheckout closed 1 week ago

lightningcheckout commented 1 week ago

I tried to run folgore in a dockerized environment. When starting core lightning I get the following error:

/root/.lightning/plugins/folgore_plugin: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
lightningd: FATAL SIGNAL 11 (version v24.05-modded)

The docker image is running OpenSSL 1.1.1w 11 Sep 2023, which may cause the incompatability.

lightningcheckout commented 1 week ago

Think this is more a compatability issue, then a issue for folgore or CLN. But not sure were/how to fix it

vincenzopalazzo commented 1 week ago

I think you are missing te open SSL, so you should install it in your env

An example can be https://askubuntu.com/questions/1261614/ubuntu-20-04-libssl-so-1-0-0-cannot-open-shared-object-file-no-such-file-or-d

lightningcheckout commented 1 week ago

I think you are missing te open SSL, so you should install it in your env

An example can be https://askubuntu.com/questions/1261614/ubuntu-20-04-libssl-so-1-0-0-cannot-open-shared-object-file-no-such-file-or-d

Yes, I'm missing the openssl3, because the docker base image of Core Lightning is debian-bullseye. Which makes currently folgore not compatible with running CoreLN in docker.

What I tried so far:

Is het possible to downgrade the requirement for folgore to only require openssl version 1 for the time being?

I think bullseye runs out of support soon, so most likely the CoreLN image will be updated as well.

vincenzopalazzo commented 1 week ago

Yes, I'm missing the openssl3, because the docker base image of Core Lightning is debian-bullseye. Which makes currently folgore not compatible with running CoreLN in docker.

Untrue,

You can use docker multistage and build Folgore with the any compatible image, then you can copy just the binary inside the cln image one, see https://docs.docker.com/build/building/multi-stage/

Is het possible to downgrade the requirement for folgore to only require openssl version 1 for the time being?

No because it is not folgore that it is requiring this but a library that iirc is curl

lightningcheckout commented 1 week ago

Yes, I'm missing the openssl3, because the docker base image of Core Lightning is debian-bullseye. Which makes currently folgore not compatible with running CoreLN in docker.

Untrue,

You can use docker multistage and build Folgore with the any compatible image, then you can copy just the binary inside the cln image one, see https://docs.docker.com/build/building/multi-stage/

Is het possible to downgrade the requirement for folgore to only require openssl version 1 for the time being?

No because it is not folgore that it is requiring this but a library that iirc is curl

Ah, now I see. So when I build folgore in debian-bullseye there won't be a problem I guess?

vincenzopalazzo commented 1 week ago

no because folgore is just a binary

vincenzopalazzo commented 1 week ago

Closing this as resolved, but feel free to reopen it

lightningcheckout commented 1 week ago

It is valid to close @vincenzopalazzo, since it wasn't an issue in folgore as you pointed out. I just tested it and now Folgore is running. Thanks for the support! If someone runs into the same issue, I have fixed it this way:

Create on your host the folder /tmp/debianhome. Make sure to have docker installed, then run

# Base docker image base on the same debian version as the current Core LN image
docker run -it -v /tmp/debianhome:/hostshare debian:11 /bin/bash -c "
apt-get update &&
apt-get install -y curl build-essential git pkg-config libssl-dev &&
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
/bin/bash
"

When above is succesfull run the following commands:

. "$HOME/.cargo/env"
cd /hostshare
git clone https://github.com/coffee-tools/folgore.git && cd folgore
make

You will now find the binary folgore_plugin at /tmp/debianhome/folgore/target/debug. You have to move it to your plugin folder.