首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GRPC服务器上的JMeter测试:服务器端异常: io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Exception

GRPC服务器上的JMeter测试:服务器端异常: io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Exception
EN

Stack Overflow用户
提问于 2021-02-28 14:32:02
回答 1查看 263关注 0票数 0

在GRPC上进行响应时间测试时,我遇到了这个问题,JMeter是一个spring启动服务器。我在类似的案例中读到过,它与TLS配置有关,但在我的案例中我不确定这一点。我只有在30秒内测试大约1000个请求,然后大约950个请求是ok的200个请求和50个抛出此服务器端异常的请求时才会出现此问题。

代码语言:javascript
复制
io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Exception: HTTP/2 client preface string missing or corrupt. Hex dump for received bytes: 16030100890100008503038bc456665bba06cf1a9f93f4f4
        at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:103) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.readClientPrefaceString(Http2ConnectionHandler.java:306) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:239) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:438) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:792) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:475) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[grpc-netty-shaded-1.31.1.jar!/:1.31.1]
        at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
EN

回答 1

Stack Overflow用户

发布于 2021-03-01 00:46:14

字节TLS是客户端发送给服务器的第一个160301字节。

在您的例子中,服务器回答说它正在等待HTTP/2客户端前言。

这意味着您的客户端正在尝试将加密字节发送到明文服务器端口。

检查您使用的方案是否正确,必须是http,而不是https (因为服务器需要明文字节)。

或者,将服务器配置为在该端口上接受加密的字节。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66406446

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档