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.

Netty won't load OpenSSL

See original GitHub issue

Hello ,I am putting the TLS into a RPC project. I copied the Netty example source codes and run it. But I got an exception when I used the OpenSSL . Exception: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_windows_x86_64, netty_tcnative_x86_64, netty_tcnative]

Expected behavior

should work

Actual behavior

I followed the official guide on the wiki on how to install the netty-tcnative with the following link [(https://netty.io/wiki/forked-tomcat-native.html)]

maven file … <dependency> <groupId>io.netty</groupId> <artifactId>netty-tcnative-boringssl-static</artifactId> <version>2.0.0.Final</version> <classifier>${os.detected.classifier}</classifier> </dependency> … <extensions> <extension> <groupId>kr.motd.maven</groupId> <artifactId>os-maven-plugin</artifactId> <version>1.4.0.Final</version> </extension> </extensions>

I got the following exception when I run the souce code. java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_windows_x86_64, netty_tcnative_x86_64, netty_tcnative]

Steps to reproduce

// Configure SSL. SslContext sslCtx; try { if (SSL) { SslProvider provider = OpenSsl.isAlpnSupported() ? SslProvider.OPENSSL : SslProvider.JDK; SelfSignedCertificate ssc = new SelfSignedCertificate(); sslCtx = io.netty.handler.ssl.SslContextBuilder .forServer(ssc.certificate(), ssc.privateKey()) .sslProvider(provider) /* * NOTE: the cipher filter may not include all ciphers required by the HTTP/2 * specification. Please refer to the HTTP/2 specification for cipher * requirements. */ .ciphers(Http2SecurityUtil.CIPHERS, SupportedCipherSuiteFilter.INSTANCE) .applicationProtocolConfig( new ApplicationProtocolConfig( ApplicationProtocolConfig.Protocol.ALPN, // NO_ADVERTISE is currently the only mode supported by both OpenSsl and JDK // providers. ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, // ACCEPT is currently the only mode supported by both OpenSsl and JDK // providers. ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, ApplicationProtocolNames.HTTP_2, ApplicationProtocolNames.HTTP_1_1)) .build();

Minimal yet complete reproducer code (or URL to code)

Netty version

Netty version 4.1.25.Final

JVM version (e.g. java -version)

“1.8.0_221”

OS version (e.g. uname -a)

Win 10 pro

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
normanmaurercommented, Sep 16, 2019

What netty version you use ?

Also you should use the latest netty-tcnative-boringssl-static version:

      <version>2.0.25.Final</version>
1reaction
johnoucommented, Sep 15, 2019

Please provide full output of java -version

I suspect you are not running x64 JVM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with OpenSSL netty_tcnative - Search Guard Forum
Hi, I have a problem with loading openssl, does not make a difference if statically or dynamically linked, I always get the following...
Read more >
Netty tcnative with OpenSSL and supported groups (elliptic ...
I need to be able to restrict (whitelist) the elliptic curves (supported_groups extension) used for ECDHE ephemeral key exchange during SSL ...
Read more >
Integrating OpenSSL / BoringSSL - Hazelcast Documentation
You cannot integrate OpenSSL into Hazelcast when Symmetric Encryption is enabled. Also note that the symmetric encryption feature has been deprecated. TLS/SSL ...
Read more >
netty-tcnative : 2.0.42.Final - Maven Central Repository Search
A Mavenized fork of Tomcat Native which incorporates various patches. This artifact is dynamically linked to OpenSSL and Apache APR. io.netty:netty- ...
Read more >
Setting up development environment - Netty.docs
brew install autoconf automake libtool openssl ... Otherwise, you'll see IntelliJ IDEA complains that it cannot find io.netty:netty-tcnative:windows-x86_32 ...
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