Closed flozano closed 4 weeks ago
```
1048 [main] DEBUG i.n.u.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
1049 [main] DEBUG i.n.u.internal.PlatformDependent0 - Java version: 21
1051 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
1052 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe base methods: all available
1052 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.storeFence: available
1053 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Buffer.address: available
1055 [main] DEBUG i.n.u.internal.PlatformDependent0 - direct buffer constructor: available
1056 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
1059 [main] DEBUG i.n.u.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): available
1060 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.DirectByteBuffer.
```
1334 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
1371 [main] DEBUG i.n.u.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
1371 [main] DEBUG i.n.u.internal.PlatformDependent0 - Java version: 21
1374 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
1376 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe base methods: all available
1376 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.storeFence: available
1378 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Buffer.address: available
1382 [main] DEBUG i.n.u.internal.PlatformDependent0 - direct buffer constructor: available
1384 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
1396 [main] DEBUG i.n.u.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): available
1402 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.DirectByteBuffer.
```
1554 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
1586 [main] DEBUG i.n.u.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
1587 [main] DEBUG i.n.u.internal.PlatformDependent0 - Java version: 21
1590 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
1591 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe base methods: all available
1592 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.storeFence: available
1593 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Buffer.address: available
1596 [main] DEBUG i.n.u.internal.PlatformDependent0 - direct buffer constructor: available
1597 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
1601 [main] DEBUG i.n.u.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): available
1603 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.DirectByteBuffer.
We had a similar experience with Amazon Linux 2023.
libcrypt
is deprecated and is actually being removed from most popular Linux distributions, in particular because of recent CVEs.
libxcrypt-compat
is currently the way to go.
But then, should tc-native go with libxcrypt
instead of libcrypt
?
hmm then the issue is that the x86_64 binary does not depend on libxcrypt-compat?
Are you sure that legacy libcrypt
is not installed on your x86_64 images?
On our side, we ended up with the legacy libcrypt
present on our x86_64 images but absent on our arm ones. We're still to investigate how it happened (difference between source AL2023 images? pulled by another packages?).
uh, how did you check? what packages are the legacy ones?
in x64:
$ rpm -qa | grep crypt
crypto-policies-20240202-1.git283706d.el9.noarch
libxcrypt-4.4.18-3.el9.x86_64
libgcrypt-1.10.0-10.el9_2.x86_64
cryptsetup-libs-2.6.0-3.el9.x86_64
crypto-policies-scripts-20240202-1.git283706d.el9.noarch
libxcrypt-devel-4.4.18-3.el9.x86_64
cryptsetup-2.6.0-3.el9.x86_64
$ cd /lib64
$ ls *crypt*
libcrypto.so libcrypto.so.3.0.7 libcryptsetup.so.12.9.0 libcrypt.so.2 libgcrypt.so.20 libk5crypto.so.3
libcrypto.so.3 libcryptsetup.so.12 libcrypt.so libcrypt.so.2.0.0 libgcrypt.so.20.4.0 libk5crypto.so.3.1
cryptsetup:
libcryptsetup-token-systemd-pkcs11.so libcryptsetup-token-systemd-tpm2.so
$ sudo dnf install libxcrypt-compat
...
$ ls *crypt*
libcrypto.so libcryptsetup.so.12 libcrypt.so.1 libcrypt.so.2.0.0 libk5crypto.so.3
libcrypto.so.3 libcryptsetup.so.12.9.0 libcrypt.so.1.1.0 libgcrypt.so.20 libk5crypto.so.3.1
libcrypto.so.3.0.7 libcrypt.so libcrypt.so.2 libgcrypt.so.20.4.0
cryptsetup:
libcryptsetup-token-systemd-pkcs11.so libcryptsetup-token-systemd-tpm2.so
$ ls -la libcrypt.so
lrwxrwxrwx. 1 root root 17 Feb 10 2022 libcrypt.so -> libcrypt.so.2.0.0
$ rpm -qf libcrypt.so.2
libxcrypt-4.4.18-3.el9.x86_64
$ rpm -qf libcrypt.so.1
libxcrypt-compat-4.4.18-3.el9.x86_64
I just returned from vacation but I think we should be able to not depend on libcrypt in general... need to look into it.
is this netty-tcnative or netty-tcnative-boringssl-static ?
netty-tcnative-boringssl-static in my case.
hmm netty-tcnative-boringssl-static should not depend on libcrypt @slandelle ... what version ?
Yes, netty-tcnative-boringssl-static (2.0.66) in my case also.
here I posted the list of netty JARs in the classpath when reproducing (aside from netty-common-999.2-SNAPSHOT.jar which is mine and has a really bad name as you can see)
in x86_64 ldd does not show any dependency:
$ unzip ../netty-tcnative-boringssl-static-2.0.66.Final-linux-x86_64.jar
Archive: ../netty-tcnative-boringssl-static-2.0.66.Final-linux-x86_64.jar
creating: META-INF/
inflating: META-INF/MANIFEST.MF
creating: META-INF/license/
creating: META-INF/maven/
creating: META-INF/maven/io.netty/
creating: META-INF/maven/io.netty/netty-tcnative-boringssl-static/
creating: META-INF/native/
creating: META-INF/versions/
creating: META-INF/versions/11/
inflating: META-INF/LICENSE.txt
inflating: META-INF/NOTICE.txt
inflating: META-INF/license/LICENSE.aix-netbsd.txt
inflating: META-INF/license/LICENSE.boringssl.txt
inflating: META-INF/license/LICENSE.mvn-wrapper.txt
inflating: META-INF/license/LICENSE.tomcat-native.txt
inflating: META-INF/maven/io.netty/netty-tcnative-boringssl-static/pom.properties
inflating: META-INF/maven/io.netty/netty-tcnative-boringssl-static/pom.xml
inflating: META-INF/native/libnetty_tcnative_linux_x86_64.so
inflating: META-INF/versions/11/module-info.class
inflating: META-INF/INDEX.LIST
$ ldd META-INF/native/libnetty_tcnative_linux_x86_64.so
ldd: warning: you do not have execution permission for `META-INF/native/libnetty_tcnative_linux_x86_64.so'
linux-vdso.so.1 => (0x00007ffcd072c000)
librt.so.1 => /lib64/librt.so.1 (0x00007fba0c640000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fba0c424000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fba0c220000)
libc.so.6 => /lib64/libc.so.6 (0x00007fba0be53000)
/lib64/ld-linux-x86-64.so.2 (0x00007fba0cc88000)
but in aarch64 it does:
$ unzip ../netty-tcnative-boringssl-static-2.0.66.Final-linux-aarch_64.jar
Archive: ../netty-tcnative-boringssl-static-2.0.66.Final-linux-aarch_64.jar
creating: META-INF/
inflating: META-INF/MANIFEST.MF
creating: META-INF/license/
creating: META-INF/maven/
creating: META-INF/maven/io.netty/
creating: META-INF/maven/io.netty/netty-tcnative-boringssl-static/
creating: META-INF/native/
creating: META-INF/versions/
creating: META-INF/versions/11/
inflating: META-INF/LICENSE.txt
inflating: META-INF/NOTICE.txt
inflating: META-INF/license/LICENSE.aix-netbsd.txt
inflating: META-INF/license/LICENSE.boringssl.txt
inflating: META-INF/license/LICENSE.mvn-wrapper.txt
inflating: META-INF/license/LICENSE.tomcat-native.txt
inflating: META-INF/maven/io.netty/netty-tcnative-boringssl-static/pom.properties
inflating: META-INF/maven/io.netty/netty-tcnative-boringssl-static/pom.xml
inflating: META-INF/native/libnetty_tcnative_linux_aarch_64.so
inflating: META-INF/versions/11/module-info.class
inflating: META-INF/INDEX.LIST
$ ldd META-INF/native/libnetty_tcnative_linux_aarch_64.so
ldd: warning: you do not have execution permission for `META-INF/native/libnetty_tcnative_linux_aarch_64.so'
linux-vdso.so.1 (0x0000ffffbe8bf000)
librt.so.1 => /lib64/librt.so.1 (0x0000ffffbe861000)
libcrypt.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x0000ffffbe840000)
libc.so.6 => /lib64/libc.so.6 (0x0000ffffbe442000)
/lib/ld-linux-aarch64.so.1 (0x0000ffffbe882000)
$
ah ok... so only on aarch64 it depends on libcrypt. This makes sense and I can fix that.
Same thing here: 2.0.66. And indeed we only experience this issue on ARM.
note also that x86_64 links to libpthread whereas aarch64 does not.
EDIT: Likely same as #722
When using tcnative with BoringSSL in arm64, when doing
OpenSsl.ensureAvailability()
to verify everything works well, it fails unless the package libxcrypt-compat is installed. If installed it works well, if not:full error
``` 1014 [main] DEBUG i.n.u.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false 1014 [main] DEBUG i.n.u.internal.PlatformDependent0 - Java version: 21 1016 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available 1017 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe base methods: all available 1017 [main] DEBUG i.n.u.internal.PlatformDependent0 - sun.misc.Unsafe.storeFence: available 1018 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Buffer.address: available 1021 [main] DEBUG i.n.u.internal.PlatformDependent0 - direct buffer constructor: available 1021 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true 1025 [main] DEBUG i.n.u.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): available 1026 [main] DEBUG i.n.u.internal.PlatformDependent0 - java.nio.DirectByteBuffer.(long, {int,long}): available
1026 [main] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: available
1026 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
1026 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
1028 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: 2048917504 bytes
1028 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: 1024
1029 [main] DEBUG i.netty.util.internal.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
1030 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
1035 [main] DEBUG i.n.u.internal.NativeLibraryLoader - -Dio.netty.native.workdir: /tmp (io.netty.tmpdir)
1035 [main] DEBUG i.n.u.internal.NativeLibraryLoader - -Dio.netty.native.deleteLibAfterLoading: true
1035 [main] DEBUG i.n.u.internal.NativeLibraryLoader - -Dio.netty.native.tryPatchShadedId: true
1035 [main] DEBUG i.n.u.internal.NativeLibraryLoader - -Dio.netty.native.detectNativeLibraryDuplicates: true
1063 [main] DEBUG io.netty.handler.ssl.OpenSsl - Failed to load netty-tcnative; OpenSslEngine will be unavailable, unless the application has already loaded the symbols by some other means. See https://netty.io/wiki/forked-tomcat-native.html for more information.
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_aarch_64_fedora, netty_tcnative_linux_aarch_64, netty_tcnative_aarch_64, netty_tcnative]
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:114)
at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:682)
at io.netty.handler.ssl.OpenSsl.(OpenSsl.java:108)
at SSLChecker.main(SSLChecker.java:13)
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative_linux_aarch_64_fedora
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 common frames omitted
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_linux_aarch_64_fedora.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 4 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64_fedora in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64_fedora in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative_linux_aarch_648414086370347824760.so: libcrypt.so.1: cannot open shared object file: No such file or directory
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2025)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:218)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative_linux_aarch_648414086370347824760.so: libcrypt.so.1: cannot open shared object file: No such file or directory
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2025)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative_aarch_64
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 common frames omitted
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_aarch_64.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 4 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 common frames omitted
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 4 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 common frames omitted
1079 [main] DEBUG io.netty.handler.ssl.OpenSsl - Initialize netty-tcnative using engine: 'default'
1082 [main] DEBUG io.netty.handler.ssl.OpenSsl - Failed to initialize netty-tcnative; OpenSslEngine will be unavailable. See https://netty.io/wiki/forked-tomcat-native.html for more information.
java.lang.UnsatisfiedLinkError: 'int io.netty.internal.tcnative.Library.aprMajorVersion()'
at io.netty.internal.tcnative.Library.aprMajorVersion(Native Method)
at io.netty.internal.tcnative.Library.initialize(Library.java:191)
at io.netty.handler.ssl.OpenSsl.initializeTcNative(OpenSsl.java:687)
at io.netty.handler.ssl.OpenSsl.(OpenSsl.java:125)
at SSLChecker.main(SSLChecker.java:13)
Exception in thread "main" java.lang.UnsatisfiedLinkError: failed to load the required native library
at io.netty.handler.ssl.OpenSsl.ensureAvailability(OpenSsl.java:573)
at SSLChecker.main(SSLChecker.java:13)
Caused by: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_aarch_64_fedora, netty_tcnative_linux_aarch_64, netty_tcnative_aarch_64, netty_tcnative]
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:114)
at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:682)
at io.netty.handler.ssl.OpenSsl.(OpenSsl.java:108)
... 1 more
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative_linux_aarch_64_fedora
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 more
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_linux_aarch_64_fedora.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 4 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64_fedora in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64_fedora in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 more
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative_linux_aarch_648414086370347824760.so: libcrypt.so.1: cannot open shared object file: No such file or directory
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2025)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:218)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 more
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative_linux_aarch_648414086370347824760.so: libcrypt.so.1: cannot open shared object file: No such file or directory
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2025)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 more
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative_aarch_64
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 more
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_aarch_64.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 4 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_aarch_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 more
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 3 more
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_tcnative.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 4 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:396)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 4 more
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:430)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:422)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:388)
... 5 more
```
in EL9/x86_64 however without libxcrypt-compat package being installed, the same code works well.