zalopay-oss / jmeter-grpc-plugin

A JMeter plugin supports load test gRPC
Apache License 2.0
42 stars 23 forks source link

Got java.lang.RuntimeException: ManagedChannel allocation site, Please Help #12

Open yanwi opened 3 years ago

yanwi commented 3 years ago

Hi, I use your plugin and when I test always got this, I still using gui, when got this error, still can hit another But when I use cmd, always got this error so I cannot load test

SEVERE: ~~~ Channel ManagedChannelImpl{logId=1, target=10.27.2.204:6790} was not shutdown properly!!! ~~~ Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true. java.lang.RuntimeException: ManagedChannel allocation site at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.(ManagedChannelOrphanWrapper.java:94) at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:52) at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:43) at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:518) at vn.zalopay.jmeter.grpc.utils.GrpcUtils.getChannel(GrpcUtils.java:180) at vn.zalopay.jmeter.grpc.client.GrpcClientSampler.initGrpcClient(GrpcClientSampler.java:56) at vn.zalopay.jmeter.grpc.client.GrpcClientSampler.sample(GrpcClientSampler.java:69) at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) at java.lang.Thread.run(Thread.java:748)

yanwi commented 3 years ago

this is log in jmeter

2020-10-09 16:32:12,512 INFO v.z.j.g.c.GrpcClientSampler: Created GrpcClientSampler 2020-10-09 16:32:12,512 INFO v.z.j.g.c.GrpcClientSampler: Created GrpcClientSampler 2020-10-09 16:32:12,513 INFO o.a.j.e.StandardJMeterEngine: Running the test! 2020-10-09 16:32:12,513 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2020-10-09 16:32:12,513 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, local) 2020-10-09 16:32:12,620 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group 2020-10-09 16:32:12,620 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group. 2020-10-09 16:32:12,620 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error 2020-10-09 16:32:12,620 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false 2020-10-09 16:32:12,620 INFO v.z.j.g.c.GrpcClientSampler: Created GrpcClientSampler 2020-10-09 16:32:12,620 INFO o.a.j.t.ThreadGroup: Started thread group number 1 2020-10-09 16:32:12,620 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started 2020-10-09 16:32:12,620 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1 2020-10-09 16:32:12,729 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1 2020-10-09 16:32:12,729 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1 2020-10-09 16:32:12,729 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test 2020-10-09 16:32:12,730 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, local)

thoainguyen commented 3 years ago

Hi @yanwi, please help me check that the request already hit on server or not? For the error above, I think that you force terminated the process by press Ctrl+C on command line, and the gRPC connection was interrupted.

Thanks & BR

yanwi commented 3 years ago

Hi @thoainguyen, If the request hit your server, the error above seemly cause annoyed but it still worked then I will update the plugin by add the listener to close connection when catch a signal (IPC) in future. -> already received on my server

So the architecture of my test like this jmeter -> service a -> service b

Message received on service a & service b

What confused me is because it works on gui but got that message, but when i test on cmd it doesn't work

yanwi commented 3 years ago

For the error above, I think that you force terminated the process by press Ctrl+C on command line, and the gRPC connection was interrupted. -> I didn't do this, it happens when I'm test

yanwi commented 3 years ago

2020-10-12 17:24:49,845 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'GRPC Client Sampler'. java.lang.NullPointerException: null at vn.zalopay.jmeter.grpc.client.GrpcClientSampler.sample(GrpcClientSampler.java:72) ~[jmeter-grpc-client-sampler.jar:?] at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.3] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

this is the log when I run jmeter non gui mode