我已经在 tomcat 容器内部署了一个 Web 应用程序,并使用了 grpc-netty (1.2.0) 和 netty-tcnative-boringssl-static:jar:1.1.33.Fork26。
当我打开调试日志时,它告诉我“java.lang.IllegalArgumentException:无法加载任何给定的库:[netty-tcnative-linux-x86_64,netty-tcnative-linux-x86_64-fedora,netty-tcnative]”和然后出现错误消息“java.lang.IllegalArgumentException:Jetty ALPN/NPN 尚未正确配置。”。
我已经完成了https://github.com/grpc/grpc-java/blob/master/SECURITY.md的故障排除部分,并验证了我的 netty 版本,这看起来没问题。下面是我的 Maven 依赖项列表
[INFO] | +- io.grpc:grpc-core:jar:1.2.0:compile
[INFO] | | +- com.google.guava:guava:jar:19.0:compile
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.0.11:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] | | +- io.grpc:grpc-context:jar:1.2.0:compile
[INFO] | | \- com.google.instrumentation:instrumentation-api:jar:0.3.0:compile
[INFO] | +- io.grpc:grpc-netty:jar:1.2.0:compile
[INFO] | | +- io.netty:netty-codec-http2:jar:4.1.8.Final:compile (version selected from constraint [4.1.8.Final,4.1.8.Final])
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.8.Final:compile
[INFO] | | | | \- io.netty:netty-codec:jar:4.1.8.Final:compile
[INFO] | | | \- …Run Code Online (Sandbox Code Playgroud)