[Bug]: ARM64 Docker image crashes on startup (GLIBC_2.38 not found by sqlite3) #775

Closed
opened 2026-03-13 23:11:30 +00:00 by IbbyLabs · 9 comments
IbbyLabs commented 2026-03-13 23:11:30 +00:00 (Migrated from github.com)

I recently tried spinning up the latest webstreamr/webstreamr Docker image on an ARM64 Oracle Server, but the container immediately gets stuck in a crash loop on startup.
The issue seems to be a glibc version mismatch with the prebuilt sqlite3 binary pulled during the image build process.
Error Logs:
When checking the container logs, it instantly throws this ERR_DLOPEN_FAILED error:

/app/node_modules/bindings/bindings.js:121
        throw e;
        ^
Error: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /app/node_modules/sqlite3/build/Release/node_sqlite3.node)
    at Object..node (node:internal/modules/cjs/loader:1970:18)
  code: 'ERR_DLOPEN_FAILED'
}

Root Cause:
The precompiled ARM64 sqlite3 binary that npm downloads requires GLIBC_2.38. However, the base image being used in the Dockerfile (node:24, which currently defaults to Debian Bookworm) ships with an older version of glibc. When Node.js tries to load the database engine, it crashes the container.

Suggested Fixes:
I was able to fix this locally by cloning the repo and modifying the Dockerfile.
Option 1: Force sqlite3 to build from source (Easiest)
By appending --build-from-source=sqlite3 to the production install step in the Dockerfile, npm will compile the C++ binary against the container's native glibc rather than downloading the incompatible prebuilt binary.

Change this:

RUN npm ci --only=production

# To this:
RUN npm ci --only=production --build-from-source=sqlite3

Option 2: Update the Base Image OS
Switching the base image to a modern OS that natively includes GLIBC_2.38 or newer (like Ubuntu 24.04) would allow the prebuilt sqlite3 binaries to run right out of the box.

I recently tried spinning up the latest webstreamr/webstreamr Docker image on an ARM64 Oracle Server, but the container immediately gets stuck in a crash loop on startup. The issue seems to be a glibc version mismatch with the prebuilt sqlite3 binary pulled during the image build process. Error Logs: When checking the container logs, it instantly throws this ERR_DLOPEN_FAILED error: ``` /app/node_modules/bindings/bindings.js:121 throw e; ^ Error: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /app/node_modules/sqlite3/build/Release/node_sqlite3.node) at Object..node (node:internal/modules/cjs/loader:1970:18) code: 'ERR_DLOPEN_FAILED' } ``` Root Cause: The precompiled ARM64 sqlite3 binary that npm downloads requires GLIBC_2.38. However, the base image being used in the Dockerfile (node:24, which currently defaults to Debian Bookworm) ships with an older version of glibc. When Node.js tries to load the database engine, it crashes the container. Suggested Fixes: I was able to fix this locally by cloning the repo and modifying the Dockerfile. Option 1: Force sqlite3 to build from source (Easiest) By appending `--build-from-source=sqlite3` to the production install step in the Dockerfile, npm will compile the C++ binary against the container's native glibc rather than downloading the incompatible prebuilt binary. # Change this: ``` RUN npm ci --only=production # To this: RUN npm ci --only=production --build-from-source=sqlite3 ``` Option 2: Update the Base Image OS Switching the base image to a modern OS that natively includes GLIBC_2.38 or newer (like Ubuntu 24.04) would allow the prebuilt sqlite3 binaries to run right out of the box.
derrickb commented 2026-03-14 08:21:15 +00:00 (Migrated from github.com)

I am on Ubuntu 24.04 but got this same error after updating the image this morning.

I am on Ubuntu 24.04 but got this same error after updating the image this morning.
webstreamr commented 2026-03-14 08:37:08 +00:00 (Migrated from github.com)

Sorry for that. Can you check if it's better now, please?

Sorry for that. Can you check if it's better now, please?
Naumanbo commented 2026-03-14 12:02:08 +00:00 (Migrated from github.com)

I am getting the same issue after the latest release. I am also on Ubuntu 24.04

I am getting the same issue after the latest release. I am also on Ubuntu 24.04
derrickb commented 2026-03-14 12:02:46 +00:00 (Migrated from github.com)

I've just pulled latest and redeployed but getting the same error.

I've just pulled latest and redeployed but getting the same error.
webstreamr commented 2026-03-14 13:01:31 +00:00 (Migrated from github.com)

Maybe now? 🙃
I downgraded sqlite again. Can only take a close look a bit later.

Maybe now? 🙃 I downgraded sqlite again. Can only take a close look a bit later.
derrickb commented 2026-03-14 13:07:03 +00:00 (Migrated from github.com)

Yup that works, thank you!

Yup that works, thank you!
webstreamr commented 2026-03-14 13:19:29 +00:00 (Migrated from github.com)

Great, thx! I'll test the upgrade properly next time. Sorry.

Great, thx! I'll test the upgrade properly next time. Sorry.
IbbyLabs commented 2026-03-14 13:40:13 +00:00 (Migrated from github.com)

It's all good thank you

It's all good thank you
IbbyLabs commented 2026-03-14 16:01:58 +00:00 (Migrated from github.com)

Can confirm the latest build works for me now thank you

Can confirm the latest build works for me now thank you
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Creepso/webstreamr-github#775
No description provided.