-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netty-tcnative-boringssl-static fails to load after version 2.0.48 #716
Comments
I have also been impacted by this while trying to upgrade grpc-java to the latest netty. It looks like since netty-tcnative-boringssl-static 2.0.49 the jar no longer contains the native libraries and at least Gradle and Bazel are having a hard time including the dependent libraries that now have them. In our Gradle build I was able to work around this by including all the individual libraries (e.g. "io.netty:netty-tcnative-boringssl-static:2.0.51.Final:linux-x86_64") excplicitly. Bazel does not seem to like this approach though and reports a cyclical dependency: ERROR: /tmpfs/tmp/bazel/external/maven/BUILD:548:11: in jvm_import rule @maven//:io_netty_netty_tcnative_boringssl_static_osx_aarch_64: cycle in dependency graph: |
@spencejackson, are you using Gradle? It seems things may work okay for Maven, but not Gradle. Classifiers are a murky part of Maven's package format. It isn't surprising to me that different systems don't all work identically here. It may be best to restore the uber jar for the native/ files, but leave the class files split out. |
Yes, I'm using Gradle. |
2.0.49.Final removed the .so files from the artifact, so our tests do not pass against the latest release. See netty/netty-tcnative#716 JAVA-4488
We're also using Gradle and are impacted by the change. We were packaging the uber-jar as part of our platform IPC libraries so we can support both our deployed servers and the wide variety of developer environments. Edit: We are working around this by explicitly bringing in each of the classifiers, it's working well in our initial tests 😄 |
@ejona86 I doubt that the problem is related to Gradle. From what I can see, the netty-tcnative-boringssl-static uber jar which used to contain the native libraries for all the platforms is now empty! Hence anyone depending on the uber jar will now fail to load the native library. The most likely commit that broke this is: 6fb5b01 Note that libraries that depend on netty-tcnative-boringssl-static (eg. Spring) have dependencies on the uber jar because they don't know what platform their users are going to be on. |
I agree. After 2.0.48 the size of the jar takes a nosedive.
|
But the pom now depends on the various platform-specific classifiers. So the other binaries are getting brought it from the dependency system. It seems it was likely tested with Maven and got working, but Gradle behaves differently. |
I think a related issue is being thrown up by 6da7a21 (included in
This is causing problems in my bazel build where javac is failing to handle this transitive dep on the classpath:
|
Same issue here in clojure app build with leiningen:
|
@liuchong, did you add that comment to the wrong github issue? That error seems to have no relation with this issue. |
Not sure, but my fail was also start from after 2.0.48, I thinks should be related issue although the error message seems not. |
FYI - this issue is now mentioned on the netty-tcnative site. There is a "Gradle and Bazel" section that states:
I have a working Gradle solution for grpc-java in grpc/grpc-java#9027, but I still need to wait for a new Bazel build with the mentioned fix. |
why netty-tcnative-boringssl-static-1.0.48 to netty-tcnative-boringssl-static-1.0.49 is problem ? java.lang.IllegalStateException: Could not find TLS ALPN provider; no working netty-tcnative, Conscrypt, or Jetty NPN/ALPN available |
Why does netty do this (all the time !) ?!!! |
I think this should be fixed |
Starting in 2.0.49, I am seeing:
OpenSsl.isAvailable() returns false
OpenSsl.unavailabilityCause() returns
[io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:114), io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:705), io.netty.handler.ssl.OpenSsl.(OpenSsl.java:146), io.baffle.shield.sql.mysql.BaffleShield.run(BaffleShield.java:349)]
The text was updated successfully, but these errors were encountered: