通过jmeter压测工具调用服务端报错:no kitex compressor registered found for:gzip
hmldd opened this issue · 2 comments
Describe the bug
通过jmeter压测工具调用服务端报错:no kitex compressor registered found for:gzip
2024/06/07 12:09:21.254401 server_handler.go:328: [Error] KITEX: processing gRPC request error, remoteAddr=180.169.86.54:2891, error=biz error: no kitex compressor registered found for:gzip
To Reproduce
使用jmeter压测工具触发,使用bloomRPC正常
Expected behavior
- 添加server side grpc gzip之后不再报错:
import _ "google.golang.org/grpc/encoding/gzip" - 或者提供其他server端注册方案解决方案。
- jmeter客户端关闭gzip方案
Screenshots
If applicable, add screenshots to help explain your problem.
Kitex version:
v0.9.1
Additional context
参考内容:1. https://stackoverflow.com/questions/74062727/how-do-i-resolve-the-decompressor-is-not-installed-for-grpc-encoding-issue
2. #1102
从 kitex 测的报错来看,jmeter 压测发送的 grpc 请求可能设置了压缩,这种情况下,就像你第一点写的,kitex server 也需要注册压缩器才能解决,匿名 import 这个库:https://github.com/cloudwego/kitex/blob/develop/pkg/remote/codec/protobuf/encoding/gzip/gzip.go
或者你就把 jemeter gzip 关了
@HeyJavaBean 感谢回复,main函数匿名import _ "github.com/cloudwego/kitex/pkg/remote/codec/protobuf/encoding/gzip"解决。