Ubuntu 17.04 netty-tcnative ALPN not available for JDK SSL/TLS engine

28 views
Skip to first unread message

Ashley Bye

unread,
Jul 1, 2017, 4:33:16 AM7/1/17
to Netty discussions
I'm having issues with netty-tcnative and static-boring. I've been suggested by the vert.x team that this is a netty problem rather than a vert.x issue and asked to post here. Below is an outline of the problem. As far as I can tell, I meet all the requirements for 4.x. Is anyone able to shed some light? 

I'm trying to run the vertx-grpc examples in Kotlin (running under Oracle Java, but the same issue happens with OpenJDK) on Ubuntu, but am having issues with the TLS example. I'm using `netty-tcnative` rather than the statically linked library. 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. I've tried a few other places with no success and thought I'd reach out to the Vert.x community to see if anyone else has any ideas. Any suggestions?
Reply all
Reply to author
Forward
0 new messages