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.

tcnative libraries are not correctly shaded in Windows environments (META-INF)

See original GitHub issue

Hello,

When instanciating a BigtableConnection using bigtable-hbase-1.x-hadoop dependency on Windows, an exception is thrown :

java.lang.IllegalArgumentException: ALPN is not configured properly. See https://github.com/grpc/grpc-java/blob/master/SECURITY.md#troubleshooting for more information.

The weird thing is that it works on Linux and Mac OS. So we investigate and found that this error happens because in OpenSsl class (shaded), we have an UNAVAILABILITY_CAUSE equal to failed to load any of the given library : [netty-tcnative-windows-x86_64, ...].

Indeed, the Windows tcnative library is packaged in the wrong directory! (META-INFO/ instead of META-INF/), explaining why it works on Linux or Mac OS (the relative libraries are on right folder, META-INF/). The commit dbae5f81f3580c980bd9e2c52498e13e63e0139c, relocating these, seems to introduce this bug in bigtable-hbase-parent/bigtable-hbase-1.x-shaded/pom.xml.

To fix the bug locally, we unpacked the jar, and repacked it with the com_google_bigtable_repackaged_netty_tcnative_windows_x86_64.dll in META-INF/ and it works.

I think the error is the same with bigtable-hbase-2.x-shaded, because META-INFO/ have probably been copy-pasted to the bigtable-hbase-parent/bigtable-hbase-2.x-shaded/pom.xml.

Can you please change META-INFO/ to META-INF/ in these two files? As of now, we fix it locally by manually repacking the jar, but obviously this is not a satisfying and maintainable solution.

I think this could solve many problems related to bigtable-hbase-1.x, since the error message thrown is not clear at all : this is not an ALPN problem, but more a shading issue.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
sduskiscommented, Mar 11, 2018

We’ll hopefully release the next version sometime this week. There are a handful of other issues we need to clean up that are still in progress.

0reactions
sduskiscommented, Mar 20, 2018

We still have an issue or two that’s outstanding, but we’re hopeful to get out the release in the next couple of days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detect correct JNI library at runtime instead of build time #24
my plan is: the io.netty:netty-tcnative artifact will depend on the arch-specific artifacts. We can drop all native libs into META-INF/native ...
Read more >
After shading io.netty tcnative stops working - Stack Overflow
Because of a conflict in dependencies I want to shade io.netty. After shading, the loading of the native ssl libraries (netty-tcnative-boringssl ...
Read more >
Win64 Tomcat Native library on JBoss 7 not recognised
Has anyone been able to implement the Tomcat native library on win64 ? Jboss 7.0.0.Final fails to recognise the current ia64 version for ......
Read more >
Apache Tomcat 9 (9.0.71-dev) - Changelog
Update the packaged version of the Tomcat Native Library to 1.2.35 to pick up Windows binaries built with OpenSSL 1.1.1q.(markt) ...
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
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