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

320 views
Skip to first unread message

Ashley Bye

unread,
Jun 30, 2017, 3:47:32 PM6/30/17
to vert.x
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?

Julien Viet

unread,
Jul 1, 2017, 2:52:53 AM7/1/17
to ve...@googlegroups.com
Hi,

it seems to be a Netty issue, could you ask on the netty google group ?

Julien

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/d2ada645-4cae-4355-9301-7c19e86ce828%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jez P

unread,
Jul 1, 2017, 4:23:04 AM7/1/17
to vert.x
This might answer your question

ash

unread,
Jul 1, 2017, 4:28:30 AM7/1/17
to ve...@googlegroups.com

Thanks Jez, is there anything specific in the link that you think I’ve missed?

 

Julien, I’ll fire a copy of this into the netty google group as suggested.

 

Regards

--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/gonlzpXi0P4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages