grpc-java: Jetty ALPN/NPN has not been properly configured

918 views
Skip to first unread message

Jorg Heymans

unread,
Dec 22, 2016, 8:58:58 AM12/22/16
to grpc.io
Hi,

I have been troubleshooting the ALPN error i was getting under a vanilla spring-boot configuration, using netty-tcnative-boringssl-static:1.1.33.Fork24 and a plain serverbuilder with useTransportSecurity. 

It turns out that it was caused by the spring-boot-starter-web dependency, which brings its own version of tomcat-embed-core containing the jni classes that are also packaged in the tcnative jar. 



Jorg

Carl Mastrangelo

unread,
Jan 3, 2017, 7:19:47 PM1/3/17
to grpc.io
FYI There was also a change in netty proper that made it interoperate better.  I don't have link handy, unfortunately.

Jorg Heymans

unread,
Jan 4, 2017, 5:50:09 AM1/4/17
to grpc.io
Indeed the issue I linked was closed because it was already fixed on master. Next netty version should have this fix.

Thanks
Jorg

qian...@kikatech.com

unread,
Apr 28, 2017, 8:55:49 AM4/28/17
to grpc.io
This is my way:
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`
Reply all
Reply to author
Forward
0 new messages