Skip to content
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

Missing shared-object file "apline-librdkafka.so" under "runtimes/linux-arm64/native/" folder in librdkafka.redist package #4897

Open
7 tasks
KaiWesterschwiensterdt opened this issue Nov 12, 2024 · 0 comments

Comments

@KaiWesterschwiensterdt
Copy link

KaiWesterschwiensterdt commented Nov 12, 2024

Description

When I create a Docker image using an Alpine Linux as the base image and use my .NET project which has the Confluent.Kafka package installed (which has a dependency on the librdkafka.redist package), I encounter an error while running the project. The error is due to the missing shared object file "alpine-librdkafka.so" under the "runtimes/linux-arm64/native/" folder in the librdkafka.redist package.

Logs and additional information about this error are well documented in this confluent-kafka-dotnet issue:
confluentinc/confluent-kafka-dotnet#778

How to reproduce

  1. Create a Dockerfile with Alpine Linux as the base image.
  2. Install the Confluent.Kafka package in a .NET project.
  3. Build the Docker image.
  4. Run the Docker container.
  5. Observe the error indicating the missing shared object file while produce/consume messages.

Checklist

  • librdkafka version: v2.6.0
  • Apache Kafka version: v3.9.0
  • librdkafka client configuration: any
  • Operating system: Alpine Linux ARM64
  • Provide logs
  • Provide broker log excerpts
  • Critical issue

Workaround in Dockerfile

Just copy and rename the file manual in your Dockerfile.

FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine-arm64v8
RUN apk add librdkafka

EXPOSE 8080

WORKDIR /app
COPY . .

# Delete librdkafka.so in build output
RUN rm -f /app/librdkafka.so

# Copy and rename shared object file
RUN cp /usr/lib/librdkafka.so.1 /app/alpine-librdkafka.so
# [...]

How to fix

Create apline-librdkafka.so file in runtimes/linux-arm64/native/ folder while creating librdkafka.redist package.

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

No branches or pull requests

1 participant