Open kwart opened 4 years ago
We hit the same problem with the new OpenSSL version in official Red Hat OpenShift base images:
FROM registry.access.redhat.com/ubi8/ubi
Stacktrace:
Exception in thread "main" java.lang.UnsatisfiedLinkError: failed to load the required native library
at io.netty.handler.ssl.OpenSsl.ensureAvailability(OpenSsl.java:432)
at com.hazelcast.nio.ssl.OpenSSLEngineFactory.init(OpenSSLEngineFactory.java:78)
at com.hazelcast.internal.nio.ssl.AbstractTLSChannelInitializer.loadSSLEngineFactory(AbstractTLSChannelInitializer.java:62)
at com.hazelcast.internal.nio.ssl.AbstractTLSChannelInitializer.<init>(AbstractTLSChannelInitializer.java:39)
at com.hazelcast.internal.nio.ssl.UnifiedTLSChannelInitializer.<init>(UnifiedTLSChannelInitializer.java:51)
at com.hazelcast.internal.nio.EnterpriseChannelInitializerProvider.createUnifiedTlsChannelInitializer(EnterpriseChannelInitializerProvider.java:94)
at com.hazelcast.internal.nio.EnterpriseChannelInitializerProvider.<init>(EnterpriseChannelInitializerProvider.java:37)
at com.hazelcast.instance.impl.EnterpriseNodeExtension.createChannelInitializerProvider(EnterpriseNodeExtension.java:685)
at com.hazelcast.instance.impl.DefaultNodeContext.createNetworkingService(DefaultNodeContext.java:157)
at com.hazelcast.instance.impl.Node.<init>(Node.java:255)
at com.hazelcast.instance.impl.HazelcastInstanceImpl.createNode(HazelcastInstanceImpl.java:147)
at com.hazelcast.instance.impl.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:116)
at com.hazelcast.instance.impl.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:241)
at com.hazelcast.instance.impl.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:220)
at com.hazelcast.instance.impl.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:158)
at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:91)
at com.hazelcast.core.server.HazelcastMemberStarter.main(HazelcastMemberStarter.java:46)
Caused by: java.lang.IllegalArgumentException: 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]
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:104)
at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526)
at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:93)
... 16 more
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative_linux_x86_64
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:233)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96)
... 18 more
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_linux_x86_64.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
... 19 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:316)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
... 19 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:336)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:328)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:306)
... 20 more
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative_linux_x86_64_fedora
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:233)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96)
... 18 more
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_linux_x86_64_fedora.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
... 19 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_x86_64_fedora in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:316)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
... 19 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_x86_64_fedora in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:336)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:328)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:306)
... 20 more
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative_x86_64
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:233)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96)
... 18 more
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_x86_64.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
... 19 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:316)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
... 19 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:336)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:328)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:306)
... 20 more
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative1862968541861883969.so: libssl.so.10: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1946)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1088)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:316)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:215)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96)
... 18 more
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative1862968541861883969.so: libssl.so.10: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1946)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1088)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:336)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:328)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:306)
... 20 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:316)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
... 19 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:336)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:328)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:306)
... 20 more
This affects CentOS 8 / RHEL 8 as well, but can be solved by installing the package compat-openssl10
.
It would obviously be nicer if it "just worked" (tm) with OpenSSL 1.1 from the openssl-libs
package.
any progress or update on this issue?
Any progress or update on the above issue?
The dynamically linked OpenSSL
netty-tcnative
doesn't work on Alpine Linux 3.9 and newer.Linux
netty-tcnative
artifacts work fine for (our Hazelcast) Docker images based on Alpine Linux 3.8.The problem is, Alpine 3.9 and newer updated the
libssl
in the system and only version1.1
is available. Thenetty-tcnative
doesn't work with thislibssl
version.We are considering workaround (in hazelcast/hazelcast-docker#126) which would use
openssl
(andlibssl
) from Alpine 3.8, but it would be great to have it resolved in theopenssl-dynamic
module in the netty-tcnative. E.g. have both versions compiled and provide them either in different artifacts or use some kind of fallback.