East2West
East2West

Reputation: 667

Cloud Bigtable Failure due to NPN/ALPN extensions not installed

Trying to interact with Google Cloud Bigtable via Java lib and after successfully creating connection object, send "list" command and I am getting the following error for command.run() method:

command.run(connection, argsList.subList(1, argsList.size()));

specifically:

Jul 06, 2015 1:12:15 PM io.grpc.transport.netty.ProtocolNegotiators$AbstractBufferingHandler fail
SEVERE: Transport failed during protocol negotiation
io.netty.channel.ChannelPipelineException: io.grpc.transport.netty.ProtocolNegotiators$1$1.handlerAdded() has thrown an exception; removed.
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:600)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded(DefaultChannelPipeline.java:582)
at io.netty.channel.DefaultChannelPipeline.addFirst0(DefaultChannelPipeline.java:124)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:108)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:291)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:246)
at io.grpc.transport.netty.ProtocolNegotiators$AbstractBufferingHandler.channelRegistered(ProtocolNegotiators.java:233)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelRegisteredNow(ChannelHandlerInvokerUtil.java:32)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRegistered(DefaultChannelHandlerInvoker.java:50)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:114)
at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:833)
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:487)
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:401)
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:461)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:322)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:356)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:703)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: NPN/ALPN extensions not installed  

Just following;https://cloud.google.com/bigtable/docs/samples-simple-cli

Any help would be highly appreciated!

Upvotes: 2

Views: 426

Answers (1)

Les Vogel
Les Vogel

Reputation: 7132

It is necessary to modify your eclipse java run to load the alpn-boot jar in front of all other classes / jars. Using the line:

-Xbootclasspath/p:$(pwd)/lib/bigtable/alpn-boot-${ALPN_VERSION}.jar

For more information, see ALPN.

For Unit Testing in Maven, you can look at our example

UPDATE You can now work w/o alpn-boot by using the Netty TCNative jar w/ BoringSSL we have two examples with that currently, the Managed-VM-Sample and the Quickstart. See the pom.xml for the details, the MVM sample shows how to setup your pom to compile locally and deploy. The Quickstart pom shows a compile and run on the same machine form. We hope to have all the Java samples using this soon.

Upvotes: 5

Related Questions