1

I have a Java application (runnung under Oracle Java, but the same issue happens with OpenJDK) that uses netty-tcnative. It runs without issue on macOS, but when I try running it on Ubuntu 17.04 I get the following exception:

SEVERE: ALPN not available for JDK SSL/TLS engine
io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS engine
    at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(SSLHelper.java:89)
    at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:150)
    at io.vertx.grpc.VertxChannelBuilder.build(VertxChannelBuilder.java:148)
    at uk.ashleybye.grpc.tls.Client.start(Client.kt:22)
    at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
    at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$8(DeploymentManager.java:434)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
    at java.lang.Thread.run(Thread.java:748)

netty-tcnative requires openssl >= 1.0.2 and Apache Portable Runtime. I have:

$ openssl version
OpenSSL 1.0.2g  1 Mar 2016

$ apt show libapr1
Package: libapr1
Version: 1.5.2-5

As far as I can ascertain, the correct library location for libapr is /usr/lib/x86_64-linux-gnu:

$ dpkg -L libapr1
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libapr-1.so.0.5.2
/usr/share
/usr/share/doc
/usr/share/doc/libapr1
/usr/share/doc/libapr1/changelog.Debian.gz
/usr/share/doc/libapr1/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/libapr1
/usr/lib/x86_64-linux-gnu/libapr-1.so.0

And I have attempted to add the library to the LD_LIBRARY_PATH (as mentioned here) by creating /etc/ld.so.conf.d/libapr.conf and adding /usr/lib/x86_64-linux-gnu. Running sudo ldconfig, and still nothing. Even adding it to the standard path does nothing.

As far as I can tell, I have followed all of the instructions but it's still not working. What's more bemusing is that it runs fine on a different OS. It's worth nothing that netty-tcnative requires platform specific binaries, which I detect using the google osdetector plugin for gradle. This has detected the linux binary. However, even if I use netty-tcnative-boring-static I still get the same exception. Switching up versions doesn't help either (although the 2x version didn't run on maxOS but using 1.1.33.Fork26 does). I've even installed the libnetty-tcnative-java and -jni packages from apt but still no success.

I'm at a complete loss and could really use some help getting this working. Any suggestions?

0

You must log in to answer this question.

Browse other questions tagged .