I am using grpc-netty-shaded library version: 1.50.2 and trying to configure boring SSL fo MTLS.
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<scope>runtime</scope>
<version>1.50.2</version>
</dependency>
Gprc server code:
serverCredentials = TlsServerCredentials.newBuilder()
.keyManager(new File(keyStoreCertPath),new File(keyStoreKeyPath),keyStoreCertPlainText)
.trustManager(tms)
.clientAuth(clientAuth);
server = serverBuilder.build();
server.start()
Client Code
final TlsChannelCredentials.Builder tlsBuilder = TlsChannelCredentials.newBuilder();
tlsBuilder.keyManager(new File(keyStoreCertPath), new File(keyStoreKeyPath), keyStoreCertPlainText);
final KeyStore trustStore = KeyStore.getInstance(clientSecurityDetails.getTrustStoreType().name());
trustStore.load(new FileInputStream(trustStorePath), trustStorePlainText);
final TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(trustStore);
final TrustManager[] tms = tmf.getTrustManagers();
channelCredentials = tlsBuilder
.trustManager(tms)
.build();
managedChannelBuilder = Grpc.newChannelBuilder(target, channelCredentials);
With above code, it is working fine on windows as per below logs
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - -Dio.netty.noUnsafe: false
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - Java version: 17
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.storeFence: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - java.nio.Buffer.address: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - direct buffer constructor: unavailable: Reflective setAccessible(true) disabled
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - java.nio.Bits.unaligned: available, true
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: class io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$7 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @2c0d0713
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): unavailable
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - sun.misc.Unsafe: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - maxDirectMemory: 8527020032 bytes (maybe)
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.tmpdir: Local\Temp (java.io.tmpdir)
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - Platform: Windows
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.maxDirectMemory: -1 bytes
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
DEBUG i.g.n.s.i.n.u.i.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.noPreferDirect: false
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.workdir: AppData\Local\Temp (io.netty.tmpdir)
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.deleteLibAfterLoading: true
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.tryPatchShadedId: true
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.detectNativeLibraryDuplicates: true
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - Successfully loaded the library Local\Temp\io_grpc_netty_shaded_netty_tcnative_windows_x86_6415333599142269420587.dll
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - Loaded library with name 'netty_tcnative_windows_x86_64'
DEBUG i.g.n.s.i.n.h.s.OpenSsl - Initialize netty-tcnative using engine: 'default'
**DEBUG i.g.n.s.i.n.h.s.OpenSsl - netty-tcnative using native library: BoringSSL**
DEBUG i.g.n.s.i.n.u.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.level: simple
DEBUG i.g.n.s.i.n.u.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.targetRecords: 4
DEBUG i.g.n.s.i.n.b.AbstractByteBuf - -Dio.grpc.netty.shaded.io.netty.buffer.checkAccessible: true
DEBUG i.g.n.s.i.n.b.AbstractByteBuf - -Dio.grpc.netty.shaded.io.netty.buffer.checkBounds: true
DEBUG i.g.n.s.i.n.u.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector@6ba63062
DEBUG i.g.n.s.i.n.u.i.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
DEBUG i.g.n.s.i.n.u.i.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 16
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 16
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 9
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 4194304
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: false
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
DEBUG i.g.n.s.i.n.b.ByteBufUtil - -Dio.netty.allocator.type: pooled
DEBUG i.g.n.s.i.n.b.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 0
DEBUG i.g.n.s.i.n.b.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
DEBUG i.g.n.s.i.n.u.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector@3e23e1ea
DEBUG i.g.n.s.i.n.u.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 4096
DEBUG i.g.n.s.i.n.u.Recycler - -Dio.netty.recycler.ratio: 8
DEBUG i.g.n.s.i.n.u.Recycler - -Dio.netty.recycler.chunkSize: 32
DEBUG i.g.n.s.i.n.u.Recycler - -Dio.netty.recycler.blocking: false
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
DEBUG i.g.n.s.i.n.h.s.OpenSsl - Supported protocols (OpenSSL): [SSLv2Hello, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3]
DEBUG i.g.n.s.i.n.h.s.OpenSsl - Default cipher suites (OpenSSL):
However on Linux, I am facing below errors :
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - -Dio.netty.noUnsafe: false
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - Java version: 17
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.storeFence: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - java.nio.Buffer.address: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - direct buffer constructor: unavailable: Reflective setAccessible(true) disabled
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - java.nio.Bits.unaligned: available, true
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: class io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$7 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @35d16986
DEBUG i.g.n.s.i.n.u.i.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): unavailable
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - sun.misc.Unsafe: available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - maxDirectMemory: 17179869184 bytes (maybe)
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.maxDirectMemory: -1 bytes
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
DEBUG i.g.n.s.i.n.u.i.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - -Dio.netty.noPreferDirect: false
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.workdir: /tmp (io.netty.tmpdir)
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.deleteLibAfterLoading: true
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.tryPatchShadedId: true
DEBUG i.g.n.s.i.n.u.i.NativeLibraryLoader - -Dio.netty.native.detectNativeLibraryDuplicates: true
INFO i.g.n.s.i.n.u.i.NativeLibraryLoader - /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_644004661078527626355.so exists but cannot be executed even when execute permissions set; check volume for "noexec" flag; use -Dio.grpc.netty.shaded.io.netty.native.workdir=[path] to set native working directory separately.
DEBUG i.g.n.s.i.n.h.s.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_x86_64_fedora, netty_tcnative_linux_x86_64, netty_tcnative_x86_64, netty_tcnative]
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:114)
at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:705)
at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:146)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:230)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:146)
at io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators.from(ProtocolNegotiators.java:209)
at io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider.newServerBuilderForPort(NettyServerProvider.java:45)
at io.grpc.ServerRegistry.newServerBuilderForPort(ServerRegistry.java:133)
at io.grpc.Grpc.newServerBuilderForPort(Grpc.java:133)
at com.scb.cat.lcnc.core.grpc.common.GrpcServerService.startUp(GrpcServerService.java:114)
at com.google.common.util.concurrent.AbstractIdleService$DelegateService.lambda$doStart$0(AbstractIdleService.java:64)
at com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:105)
at java.base/java.lang.Thread.run(Thread.java:833)
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: io_grpc_netty_shaded_netty_tcnative_linux_x86_64_fedora
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 12 common frames omitted
Caused by: java.io.FileNotFoundException: META-INF/native/libio_grpc_netty_shaded_netty_tcnative_linux_x86_64_fedora.so
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 13 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_linux_x86_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:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:391)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 13 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_linux_x86_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:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:425)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:417)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:383)
... 14 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_644004661078527626355.so: /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_644004661078527626355.so: failed to map segment from shared object
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:384)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:228)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:170)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:391)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:218)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 12 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_644004661078527626355.so: /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_644004661078527626355.so: failed to map segment from shared object
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:384)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:228)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:170)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:425)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:417)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:383)
... 14 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_linux_x86_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:391)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 13 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_linux_x86_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:425)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:417)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:383)
... 14 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: io_grpc_netty_shaded_netty_tcnative_x86_64
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 12 common frames omitted
Caused by: java.io.FileNotFoundException: META-INF/native/libio_grpc_netty_shaded_netty_tcnative_x86_64.so
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 13 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_x86_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:391)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 13 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_x86_64 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:425)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:417)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:383)
... 14 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: io_grpc_netty_shaded_netty_tcnative
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:105)
... 12 common frames omitted
Caused by: java.io.FileNotFoundException: META-INF/native/libio_grpc_netty_shaded_netty_tcnative.so
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:186)
... 13 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_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:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:391)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:161)
... 13 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_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:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:425)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:417)
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:383)
... 14 common frames omitted
26-03-24 02:58:00.985 [GrpcServerService STARTING] DEBUG i.g.n.s.i.n.h.s.OpenSsl - Initialize netty-tcnative using engine: 'default'
26-03-24 02:58:00.987 [GrpcServerService STARTING] DEBUG i.g.n.s.i.n.h.s.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.grpc.netty.shaded.io.netty.internal.tcnative.Library.aprMajorVersion()'
at io.grpc.netty.shaded.io.netty.internal.tcnative.Library.aprMajorVersion(Native Method)
at io.grpc.netty.shaded.io.netty.internal.tcnative.Library.initialize(Library.java:191)
at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.initializeTcNative(OpenSsl.java:710)
at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:163)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:230)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:146)
at io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators.from(ProtocolNegotiators.java:209)
at io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider.newServerBuilderForPort(NettyServerProvider.java:45)
at io.grpc.ServerRegistry.newServerBuilderForPort(ServerRegistry.java:133)
at io.grpc.Grpc.newServerBuilderForPort(Grpc.java:133)
at com.scb.cat.lcnc.core.grpc.common.GrpcServerService.startUp(GrpcServerService.java:114)
at com.google.common.util.concurrent.AbstractIdleService$DelegateService.lambda$doStart$0(AbstractIdleService.java:64)
at com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:105)
at java.base/java.lang.Thread.run(Thread.java:833)
DEBUG i.g.n.s.i.n.h.s.JdkSslContext - Default protocols (JDK): [TLSv1.3, TLSv1.2]
DEBUG i.g.n.s.i.n.h.s.JdkSslContext - Default cipher suites (JDK):
INFO i.g.n.s.i.n.u.i.NativeLibraryLoader - /tmp/libio_grpc_netty_shaded_netty_transport_native_epoll_x86_6411946066572079793482.so exists but cannot be executed even when execute permissions set; check volume for "noexec" flag; use -Dio.grpc.netty.shaded.io.netty.native.workdir=[path] to set native working directory separately.
DEBUG i.g.n.s.i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 64
DEBUG i.g.n.s.i.n.u.i.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
DEBUG i.g.n.s.i.n.u.i.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
DEBUG i.g.n.s.i.n.c.n.NioEventLoop - -Dio.netty.noKeySetOptimization: false
DEBUG i.g.n.s.i.n.c.n.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
DEBUG i.g.n.s.i.n.u.i.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
DEBUG i.g.n.s.i.n.u.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.level: simple
DEBUG i.g.n.s.i.n.u.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.targetRecords: 4
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 64
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 64
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 9
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 4194304
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: false
DEBUG i.g.n.s.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
26-03-24 02:58:01.220 [grpc-nio-boss-ELG-1-1] DEBUG i.g.n.s.i.n.c.DefaultChannelId - -Dio.netty.processId: 8677 (auto-detected)
26-03-24 02:58:01.222 [grpc-nio-boss-ELG-1-1] DEBUG i.g.n.s.i.n.u.NetUtil - -Djava.net.preferIPv4Stack: false
26-03-24 02:58:01.222 [grpc-nio-boss-ELG-1-1] DEBUG i.g.n.s.i.n.u.NetUtil - -Djava.net.preferIPv6Addresses: false
26-03-24 02:58:01.224 [grpc-nio-boss-ELG-1-1] DEBUG i.g.n.s.i.n.u.NetUtilInitializations - Loopback interface: lo (lo, 127.0.0.1)
26-03-24 02:58:01.225 [grpc-nio-boss-ELG-1-1] DEBUG i.g.n.s.i.n.u.NetUtil - /proc/sys/net/core/somaxconn: 4096
Please note that it started using JDK SSL BUG i.g.n.s.i.n.h.s.JdkSslContext - Default protocols (JDK): [TLSv1.3, TLSv1.2]
Environment Details: Java : openJDK red 17 Grpc version : 1.50.2 System details:
Operating System: Red Hat Enterprise Linux 8.9 (Ootpa)
CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
Kernel: Linux 4.18.0-513.18.1.el8_9.x86_64
cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.9 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.9"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.9 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.9"
Please let me know how I can set up grpc java using boring SSL on redhat linux enterprise 8.