You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GRPC Java examples are not working on Alpine Linux since required libnetty-tcnative-boringssl-static depends on glibc. Alpine is using musl libc and application startup will fail with message similar to
io.grpc.netty.GrpcSslContexts : netty-tcnative unavailable (this may be normal)
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative]
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:93) ~[netty-common-4.1.27.Final.jar:4.1.27.Final]
at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:440) ~[netty-handler-4.1.27.Final.jar:4.1.27.Final]
at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:97) ~[netty-handler-4.1.27.Final.jar:4.1.27.Final]
at io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:242) [grpc-netty-1.12.0.jar:1.12.0]
at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171) [grpc-netty-1.12.0.jar:1.12.0]
at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120) [grpc-netty-1.12.0.jar:1.12.0]
...
The text was updated successfully, but these errors were encountered:
Thanks for the feedback. Unfortunately, as is clear in that issue, I've tried hard to fix this, including creating a fairly large PR but it doesn't seem like netty + boringssl will ever support Alpine Linux.
If you're using Java 8 I recommend distroless, which is tiny while using glibc, and hopefully there will be a good answer to GoogleContainerTools/distroless#236 for the future of Java too.
If you're using Java9+, gRPC will work without netty-tcnative as it natively supports ALPN. I don't think it should require code change, but if it does could you add the changes so we can incorporate them into the README? Thanks!
GRPC Java examples are not working on Alpine Linux since required lib
netty-tcnative-boringssl-static
depends on glibc. Alpine is usingmusl libc
and application startup will fail with message similar toThe text was updated successfully, but these errors were encountered: