I'm trying to start a K8S pod based on a Ballerina service and I'm getting the following error
error: java.lang.UnsatisfiedLinkError {"message":"failed to load the required native library","cause":error("java.lang.IllegalArgumentException",message="Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative]")}
The runtime is ballerina/jvm-runtime:1.0.
Another reason for this could be due to missing glibc dependency (required by netty for the underlying native transport implementation) in your base image. (e.g.
alphine linux
base image does not containglibc
as per the alphine linux documentation.)Therefore, this can be solved by switching to any base image which comes with the aforementioned dependency by-default.
Related issues and discussions can be found in here and here.