confluent-kafka-dotnet: System.DllNotFoundException: Failed to load the librdkafka native library
System.DllNotFoundException: Failed to load the librdkafka native library
An error occurred using the Dotnet core Web API Errors are as follows
Microsoft.AspNetCore.Server.Kestrel[13] Connection id “0HL9RN5T1D654”, Request id “0HL9RN5T1D654:00000001”: An unhandled exception was thrown by the application. System.DllNotFoundException: Failed to load the librdkafka native library. at Confluent.Kafka.Impl.LibRdKafka.Initialize(String userSpecifiedPath) at Confluent.Kafka.Producer…ctor(IEnumerable1 config, Boolean manualPoll, Boolean disableDeliveryReports) at Confluent.Kafka.Producer2…ctor(IEnumerable1 config, ISerializer1 keySerializer, ISerializer`1 valueSerializer, Boolean manualPoll, Boolean disableDeliveryReports)
How to reproduce
Use Asp.net Core WebApi on Centos7
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 36 (15 by maintainers)
I was helped with this code before creating the producer
@mhowlett “brew install openssl” fixed everything such that he also no longer needs to explicitly call Load.
As for versions, he’s on osx 10.13.3, dotnet cli 2.2-preview/2.1, mono 5.8, Confluent.Kafka 0.11.3, building a netstandard2.0 lib used by a netcoreapp2.0 console app.
this one really saved me… my issue was that i had to dockerize an C# app that use Confluent.Kafka 1.5.3
RUN cd /tmp \ && wget https://github.com/edenhill/librdkafka/archive/refs/tags/v1.9.0.zip \ && unzip v1.9.0.zip \ && cd librdkafka-1.9.0 \ && ./configure --install-deps \ && make \ && make install \ && ldconfigwithout adding ldconfig didn’t worked
It’s a new mbp, whereas mine is probably 1.5 years old?