question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

On a system without netty-tcnative: netty 4.1.74.Final unsuccessfully tries to load netty-tcnative, while netty 4.1.70.Final detects that netty-tcnative is not in the classpath

See original GitHub issue

As the netty seems to work correctly despite the tcnative loader problem this seems be more like a cosmetical issue.

Expected behavior

It should be detected that netty-tcnative is not in the classpath like it was in netty 4.1.70.Final:

22-02-15 08:25:41,387 D [Thread-1                  InternalThreadLocalMap           86] -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
22-02-15 08:25:41,419 D [Thread-1                  OpenSsl                         137] netty-tcnative not in the classpath; OpenSslEngine will be unavailable.
22-02-15 08:25:41,622 D [Thread-1                  JdkSslContext                    97] Default protocols (JDK): [TLSv1.3, TLSv1.2] 

Actual behavior

With netty 4.1.74.Final it’s tried to load netty-tcnative which gives the following exception:

22-02-15 09:44:10,576 D [Thread-0                  InternalThreadLocalMap           89] -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
22-02-15 09:44:10,607 D [Thread-0                  NativeLibraryLoader              78] -Dio.netty.native.workdir: C:\Windows\TEMP (io.netty.tmpdir)
22-02-15 09:44:10,607 D [Thread-0                  NativeLibraryLoader              83] -Dio.netty.native.deleteLibAfterLoading: true
22-02-15 09:44:10,607 D [Thread-0                  NativeLibraryLoader              87] -Dio.netty.native.tryPatchShadedId: true
22-02-15 09:44:10,607 D [Thread-0                  NativeLibraryLoader              91] -Dio.netty.native.detectNativeLibraryDuplicates: true
22-02-15 09:44:10,607 D [Thread-0                  OpenSsl                         149] 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_windows_x86_64, netty_tcnative_x86_64, netty_tcnative]
	at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:114) ~[netty-common-4.1.74.Final.jar:4.1.74.Final]
	at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:705) ~[netty-handler-4.1.74.Final.jar:4.1.74.Final]
	at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:146) [netty-handler-4.1.74.Final.jar:4.1.74.Final]
	at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:124) [netty-handler-4.1.74.Final.jar:4.1.74.Final]
	at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:120) [netty-handler-4.1.74.Final.jar:4.1.74.Final]
	at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:817) [netty-handler-4.1.74.Final.jar:4.1.74.Final]
	at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:611) [netty-handler-4.1.74.Final.jar:4.1.74.Final]
...
22-02-15 09:44:11,092 D [Thread-0                  JdkSslContext                    97] Default protocols (JDK): [TLSv1.3, TLSv1.2] 

Steps to reproduce

Minimal yet complete reproducer code (or URL to code)

Netty version

4.1.74.Final without tcnative in the classpath

JVM version (e.g. java -version)

openjdk version “11.0.11” 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

OS version (e.g. uname -a)

Windows Server 2019 Datacenter Version 1809 OS build 17763.678

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
normanmaurercommented, Mar 4, 2022
0reactions
normanmaurercommented, Mar 4, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Index (Netty/All-in-One 4.1.23.Final API) - javadoc.io
Tries to backoff when the task can not be added due restrictions for an configured ... Ensure that netty-tcnative and its OpenSSL support...
Read more >
chore(deps): update all dependencies (major) (!151 ... - GitLab
This MR contains the following updates: Package Change Age Adoption Passing Confidence.
Read more >
A networking framework that evolves with your application
It is built on Netty and is designed to provide most of the performance/scalability benefits of Netty for common networking protocols used ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found