-
Notifications
You must be signed in to change notification settings - Fork 906
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
Postgres driver not found in ARM64 and ARM32 Docker images #7649
Comments
@Kexkey Can you please confirm your last working CLN version setup on arm64 with postgress? |
Hi @ShahanaFarooqui, I've always used Docker images that I wrote myself because the ones provided in the CLN repo were not working on ARM32. For Cyphernode, I want to make sure all the images work on AMD64, ARM32 and ARM64. I think the last version I successfully built was v23.11.2: https://github.com/SatoshiPortal/dockers/blob/342a94bc9d1b2b219731aed7d802bcc87f7aaee4/c-lightning/Dockerfile I failed to build v24+ for RPi2-3, unfortunately. The Python dependancies are a pita when building for multiple platforms. When I saw your work on the newer Dockerfiles (thanks btw!) I decided to give them a try. Docker buildx is pretty neat, I've never used it before. :) I used to build each arch on its respective hardware. Building on an RPi2 takes forever, lol! PS: I managed to use your Dockerfile to cross-compile on my Mac M1... Got the same results as when I compile on AMD64, re. no postgres drivers on ARM64. |
@Kexkey I completely agree on buildx—it made my life much easier too! Credit for the new Dockerfile goes to @NicolasDorier. As for PostgreSQL support, it appears that it is already available for both ARM64 and ARM32 architectures (according to ChatGPT). I am adding this as an enhancement for a future release, as it was not previously supported in the CLN images. |
So just to hop in. Long time ago, I got same problem where some client tooling weren't available on arm32 (only arm64 and amd64). The way I hacked around it is by extracting the CLI tooling from a postgres docker image, then downloading it rather than passing by apt-get. I would have expected ARM64 have the apt packages though. |
Thanks Nicolas! After reading your comment, I thought I'd try to base the final stage on the postgres image instead of the current It worked! We can obviously expect Postgres' official images to have all the Postgres drivers. :) More specifically, changing
to
I don't think it's the right solution though, since there are a lot of stuff in the Postgres image that we don't need for CLN. At least for now I'll do this. And it gives hints for a better way to make it work. PS: haven't tried it on ARM32 yet. This is on a Mac M1: Before (
After (
EDIT: I forgot to tell you that you need to install postgresql in the base-builder stage for the configure to pick it up... for the ARM64 arch. |
Bounty available on this: https://community.sphinx.chat/bounty/2628 |
Started to look into this, but got hung up on #7812. Filed it as a separate issue. |
Issue and Steps to Reproduce
Using CLN with PostgreSQL works with the AMD64 Docker image, but not with the ARM32 and ARM64 ones.
In the following outputs, we can see
Unable to find DB driver for postgres://...
for ARM32/ARM64 vsError calling DB setup: Could not connect to postgres://...
for AMD64.Running the CLN Docker image using Postgres on ARM32 (on a RPi3):
Running the CLN Docker image using Postgres on ARM64 (on a Mac M1):
Running the CLN Docker image using Postgres on AMD64 (on a PC):
Version
Using the Docker hub's
elementsproject/lightningd:v24.08
image. Same error happens withelementsproject/lightningd:v24.05
.More info
I also built from sources locally (on AMD64) and got the same results. I also tried adding
postgresql
package in the base-builder stage as well aspostgresql
andlibpq-dev
packages in the final stage, with the same results.I noticed the problem first on a working setup with the Postgres server up and running, so the error above is not due to the pg server not running but the driver libraries not found.
The text was updated successfully, but these errors were encountered: