Search code examples
javadockerkubernetes.net-coreignite

Error in Apache Ignite C# Client connection for kubernetes


We followed the solution suggested in Apache Ignite C# Client Connection configuration for kubernetes as thick client to connect the ignite cluster running in kubrenetes.

We get the below error message on start:

failed to start: System.EntryPointNotFoundException: Unable to find an entry point named 'dlopen' in shared library 'libcoreclr.so'. at Apache.Ignite.Core.Impl.Unmanaged.Jni.DllLoader.NativeMethodsCore.dlopen(String filename, Int32 flags) at Apache.Ignite.Core.Impl.Unmanaged.Jni.DllLoader.Load(String dllPath) at Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.LoadDll(String filePath, String simpleName) at Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.Load(String configJvmDllPath, ILogger log) at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration cfg)

We included the openjdk8 in the docker image. Here is the docker file.


#FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
#WORKDIR /app
#EXPOSE 80
#EXPOSE 443

ARG REPO=mcr.microsoft.com/dotnet/runtime
FROM $REPO:3.1.24-alpine3.15 AS base
# Install ASP.NET Core
RUN aspnetcore_version=3.1.24 \
    && wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-musl-x64.tar.gz \
    && aspnetcore_sha512='1341b6e0a9903b253a69fdf1a60cd9e6be8a5c7ea3c4a52cd1a8159461f6ba37bef7c2ae0d6df5e1ebd38cd373cf384dc55c6ef876aace75def0ac77427d3bb0' \
    && echo "$aspnetcore_sha512  aspnetcore.tar.gz" | sha512sum -c - \
    && tar -oxzf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
    && rm aspnetcore.tar.gz

RUN apk add openjdk8
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk
ENV PATH="$JAVA_HOME/bin:${PATH}"

WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
...
RUN dotnet restore "API.csproj"
COPY . .
WORKDIR "API"
RUN dotnet build "API.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "API.csproj" -c Release -o /app/publish

FROM base AS final


WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "API.dll"]````

Solution

  • This Ignite issue on Alpine Linux was fixed in 2.13, which was released yesterday - please try upgrading.

    https://issues.apache.org/jira/browse/IGNITE-16749 https://www.nuget.org/packages/Apache.Ignite/2.13.0


    Additionally, set LD_LIBRARY_PATH environment variable:

    • openjdk8: ENV LD_LIBRARY_PATH /usr/lib/jvm/default-jvm/jre/lib/amd64/server
    • openjdk11: ENV LD_LIBRARY_PATH /usr/lib/jvm/default-jvm/jre/lib/server

    Do not set JAVA_HOME and PATH - it is not necessary.