azure-functions-kafka-extension: Cannot find librdkafka when hosting in Azure

Locally the extension runs fine, but when hosting in Azure I get the error below. I’m using release 1.0.2 and hosting in a Linux premium function tier with the Node runtime.

Edit: Also occurs on a Windows-based Premium Function App

Microsoft.Azure.WebJobs.Host.Listeners.FunctionListenerException: The listener for function 'Functions.createEvents' was unable to start.
 ---> System.DllNotFoundException: Failed to load the librdkafka native library.
   at Confluent.Kafka.Impl.Librdkafka.Initialize(String userSpecifiedPath)
   at Confluent.Kafka.Consumer`2..ctor(ConsumerBuilder`2 builder)
   at Confluent.Kafka.ConsumerBuilder`2.Build()
   at Microsoft.Azure.WebJobs.Extensions.Kafka.KafkaListener`2.StartAsync(CancellationToken cancellationToken) in /home/vsts/work/1/s/src/Microsoft.Azure.WebJobs.Extensions.Kafka/Listeners/KafkaListener.cs:line 99
   at Microsoft.Azure.WebJobs.Host.Listeners.FunctionListener.StartAsync(CancellationToken cancellationToken, Boolean allowRetry) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\FunctionListener.cs:line 68
   --- End of inner exception stack trace ---

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 20 (12 by maintainers)

Most upvoted comments

thanks @shaunco. agree, this should be resolved. i’ve reopened the issue.

@FlipABit could you please try to add the following configuration setting into your function app: LD_LIBRARY_PATH=/home/site/wwwroot/bin/runtimes/linux-x64/native