tcnative libraries are not correctly shaded in Windows environments (META-INF)
See original GitHub issueHello,
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:
- Created 6 years ago
- Comments:8 (5 by maintainers)
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.
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.