Google-Cloud: Jetty ALPN/NPN has not been properly configured

痞子三分冷 提交于 2019-12-04 12:20:53

I have observed this problem with Netty version 4.1.15.Final but not with 4.1.13.Final. Check your transitive dependencies. I.e Spring Boot references Netty.

What I added to POM to make it work with Spanner API version 0.22.0-beta:

<properties> <v.netty>4.1.13.Final</v.netty> </properties> ... <dependencyManagement> <dependencies> <dependency> <groupId>io.netty</groupId> <artifactId>netty-codec</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-codec-http</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-codec-http2</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-handler</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-common</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-handler-proxy</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-transport</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-resolver</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-codec-socks</artifactId> <version>${v.netty}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-buffer</artifactId> <version>${v.netty}</version> </dependency> </dependencies> </dependencyManagement>

If the problem persists, or if it is not an option, plase run your JVM with appropriate bootclasspath entry, like:

java -Xbootclasspath/p:/tmp/alpn-boot-8.1.11.v20170118.jar -cp ...

Make sure to replace /tmp/alpn-boot-8.1.11.v20170118.jar with location of alpn jar that matches your JVM version as listed on this page: https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html

There is a possible solution on github: "Exception when configuring SSL: "Jetty ALPN/NPN has not been properly configured."

The recommended steps, quoting from the above document:

1) Edit catalina.sh /usr/local/Cellar/tomcat/8.5.3/libexec/bin/catalina.sh

2) At line 103, add the following CATALINA_OPTS="-javaagent:/Library/Tomcat/lib/jetty-alpn-agent-2.0.6.jar"

3) Restart tomcat ../bin/shutdown.sh ../bin/startup.sh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!