Reputation: 81
Do anyone know how to resolve Jetty ALPN not properly configured error, when I attempting to connect to Google Cloud BigTable?
Blockquote 2015-12-11 19:53:15,056 INFO [main] grpc.BigtableSession: Opening connection for projectId crawl-corpus-app, zoneId us-central1-c, clusterId crawl-corpus, on data host bigtable.googleapis.com, table admin host bigtabletableadmin.googleapis.com. java.io.IOException: java.lang.reflect.InvocationTargetException at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)................................................................................................................................................ Caused by: java.lang.IllegalStateException: Jetty ALPN has not been properly configured. at com.google.cloud.bigtable.grpc.BigtableSession.(BigtableSession.java:243) at com.google.cloud.bigtable.grpc.BigtableSession.(BigtableSession.java:232) at org.apache.hadoop.hbase.client.AbstractBigtableConnection.(AbstractBigtableConnection.java:128) at com.google.cloud.bigtable.hbase1_1.BigtableConnection.(BigtableConnection.java:42)
public static void main(String[] args) {
Connection connection;
try {
connection = ConnectionFactory.createConnection();
} catch (IOException e) {
e.printStackTrace();
}
Upvotes: 1
Views: 1007
Reputation: 21
This error occurs when netty jar version is mismatched with other jars.
If you received an error message "ALPN is not configured properly" or "Jetty ALPN/NPN has not been properly configured", it most likely means that:
1) ALPN related dependencies are either not present in the classpath
2) or that there is a classpath conflict
3) or that a wrong version is used due to dependency management
4) or you are on an unsupported platform (e.g., 32-bit OS).
Please see gRPC troubleshooting guide https://github.com/grpc/grpc-java/blob/master/SECURITY.md#troubleshooting.
Hope it helps.
Upvotes: 1
Reputation: 81
I needed to add a VM option for Jetty alpn-boot.
-Xbootclasspath/p:C:\Users\cleuer\.m2\repository\org\mortbay\jetty\alpn\alpn-boot\8.1.3.v20150130\alpn-boot-8.1.3.v20150130.jar
Upvotes: 3