admin管理员组文章数量:1128992
I was able to run the jmeter http sampler request script in Kubernetes, but when I try with the gRPC request, I get the below error:
2025-01-08 10:33:25,530 ERROR v.z.b.GRPCSampler: java.lang.RuntimeException: Unable to resolve service by invoking protoc:
Unable to execute protoc binary
at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:88)
at vn.zalopay.benchmark.core.ClientCaller.<init>(ClientCaller.java:53)
at vn.zalopay.benchmark.GRPCSampler.initGrpcClient(GRPCSampler.java:81)
at vn.zalopay.benchmark.GRPCSampler.initGrpcInCurrentThread(GRPCSampler.java:203)
at vn.zalopay.benchmark.GRPCSampler.initGrpcRequestSampler(GRPCSampler.java:133)
at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:90)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268)
at java.lang.Thread.run(Thread.java:750)
I was able to run the gRPC sampler request from my local JMeter UI and command line successfully but I am facing issue while executing it in docker container
docker file:
FROM alpine/jmeter:5.6.3
COPY ./lib/jmeter-grpc-request.jar /opt/apache-jmeter-5.6.3/lib/ext/jmeter-grpc-request.jar
COPY ./lib/jmeter-plugins-manager-1.10.jar /opt/apache-jmeter-5.6.3/lib/ext/jmeter-plugins-manager-1.10.jar
RUN apk add protobuf
My proto file:
syntax = "proto3";
package com.grpc.spring;
option java_package = "com.grpc.spring.service";
option java_outer_classname = "Solutions";
option java_generic_services = true;
option java_multiple_files = true;
service SolutionService {
rpc getSolution (SolutionRequest) returns (SolutionResponse) {};
}
message SolutionRequest {
string name = 1;
}
message SolutionResponse {
string message = 1;
}
Below is the protoc version from local/image:
local: libprotoc 28.3 Image: libprotoc 24.4
Will the difference in protoc version make any difference in the behaviour?
Note:
Both jmeter-plugins-manager-1.10.jar
and jmeter-grpc-request.jar
I pushed it from my local to the image.
Any help would be very much appreciated. Thanks in advance.
I was able to run the jmeter http sampler request script in Kubernetes, but when I try with the gRPC request, I get the below error:
2025-01-08 10:33:25,530 ERROR v.z.b.GRPCSampler: java.lang.RuntimeException: Unable to resolve service by invoking protoc:
Unable to execute protoc binary
at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:88)
at vn.zalopay.benchmark.core.ClientCaller.<init>(ClientCaller.java:53)
at vn.zalopay.benchmark.GRPCSampler.initGrpcClient(GRPCSampler.java:81)
at vn.zalopay.benchmark.GRPCSampler.initGrpcInCurrentThread(GRPCSampler.java:203)
at vn.zalopay.benchmark.GRPCSampler.initGrpcRequestSampler(GRPCSampler.java:133)
at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:90)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268)
at java.lang.Thread.run(Thread.java:750)
I was able to run the gRPC sampler request from my local JMeter UI and command line successfully but I am facing issue while executing it in docker container
docker file:
FROM alpine/jmeter:5.6.3
COPY ./lib/jmeter-grpc-request.jar /opt/apache-jmeter-5.6.3/lib/ext/jmeter-grpc-request.jar
COPY ./lib/jmeter-plugins-manager-1.10.jar /opt/apache-jmeter-5.6.3/lib/ext/jmeter-plugins-manager-1.10.jar
RUN apk add protobuf
My proto file:
syntax = "proto3";
package com.grpc.spring;
option java_package = "com.grpc.spring.service";
option java_outer_classname = "Solutions";
option java_generic_services = true;
option java_multiple_files = true;
service SolutionService {
rpc getSolution (SolutionRequest) returns (SolutionResponse) {};
}
message SolutionRequest {
string name = 1;
}
message SolutionResponse {
string message = 1;
}
Below is the protoc version from local/image:
local: libprotoc 28.3 Image: libprotoc 24.4
Will the difference in protoc version make any difference in the behaviour?
Note:
Both jmeter-plugins-manager-1.10.jar
and jmeter-grpc-request.jar
I pushed it from my local to the image.
Any help would be very much appreciated. Thanks in advance.
Share Improve this question edited Jan 8 at 11:53 Praveen Dhasarathan asked Jan 8 at 11:45 Praveen DhasarathanPraveen Dhasarathan 6682 gold badges11 silver badges25 bronze badges1 Answer
Reset to default 0Run arch
command in both local and k8s pod and see what is the output. It might be the case you need to re-compile or cross-compile your proto files
Going forward consider taking a look into jmeter.log file for any suspicious entries and it would also be a good idea to enable JMeter debug logging at least for the components/plugins you're having problems with.
本文标签: gRPC with jmeter is not working in alpinejmeter563 imageStack Overflow
版权声明:本文标题:gRPC with jmeter is not working in alpinejmeter:5.6.3 image - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736732649a1950081.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论