Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a simple project with Simple Value Config and Simple Key Config #437

Closed
2 tasks done
cleverton-heusner opened this issue Apr 3, 2024 · 5 comments
Closed
2 tasks done
Assignees

Comments

@cleverton-heusner
Copy link

cleverton-heusner commented Apr 3, 2024

What happened?

I'm new in JMeter (5.6.3 in this case) and trying starting a simple project with kloadgen (version bellow) and Java 17. I'm using a Java Request for generating the data in cluster and decided not using the Schema Registry. Instead, a KLG - Simple Value Config and a KLG - Simple Key Config. My test plan is:

<?xml version="1.0" encoding="UTF-8"?> <jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan"> <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables"> <collectionProp name="Arguments.arguments"/> </elementProp> <boolProp name="TestPlan.functional_mode">false</boolProp> <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> </TestPlan> <hashTree> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group"> <intProp name="ThreadGroup.num_threads">1</intProp> <intProp name="ThreadGroup.ramp_time">1</intProp> <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller"> <stringProp name="LoopController.loops">1</stringProp> <boolProp name="LoopController.continue_forever">false</boolProp> </elementProp> </ThreadGroup> <hashTree> <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Message Producer"> <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="bootstrap.servers" elementType="Argument"> <stringProp name="Argument.name">bootstrap.servers</stringProp> <stringProp name="Argument.value">localhost:9092</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="zookeeper.servers" elementType="Argument"> <stringProp name="Argument.name">zookeeper.servers</stringProp> <stringProp name="Argument.value">localhost:2181</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="kafka.topic.name" elementType="Argument"> <stringProp name="Argument.name">kafka.topic.name</stringProp> <stringProp name="Argument.value">testando</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="compression.type" elementType="Argument"> <stringProp name="Argument.name">compression.type</stringProp> <stringProp name="Argument.value">gzip</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="batch.size" elementType="Argument"> <stringProp name="Argument.name">batch.size</stringProp> <stringProp name="Argument.value">16384</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="linger.ms" elementType="Argument"> <stringProp name="Argument.name">linger.ms</stringProp> <stringProp name="Argument.value">0</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="buffer.memory" elementType="Argument"> <stringProp name="Argument.name">buffer.memory</stringProp> <stringProp name="Argument.value">33554432</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="acks" elementType="Argument"> <stringProp name="Argument.name">acks</stringProp> <stringProp name="Argument.value">1</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="send.buffer.bytes" elementType="Argument"> <stringProp name="Argument.name">send.buffer.bytes</stringProp> <stringProp name="Argument.value">131072</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="receive.buffer.bytes" elementType="Argument"> <stringProp name="Argument.name">receive.buffer.bytes</stringProp> <stringProp name="Argument.value">32768</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="security.protocol" elementType="Argument"> <stringProp name="Argument.name">security.protocol</stringProp> <stringProp name="Argument.value">PLAINTEXT</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="kerberos.auth.enabled" elementType="Argument"> <stringProp name="Argument.name">kerberos.auth.enabled</stringProp> <stringProp name="Argument.value">NO</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="jaas.enabled" elementType="Argument"> <stringProp name="Argument.name">jaas.enabled</stringProp> <stringProp name="Argument.value">NO</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="java.security.auth.login.config" elementType="Argument"> <stringProp name="Argument.name">java.security.auth.login.config</stringProp> <stringProp name="Argument.value">&lt;JAAS File Location&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="java.security.krb5.conf" elementType="Argument"> <stringProp name="Argument.name">java.security.krb5.conf</stringProp> <stringProp name="Argument.value">&lt;krb5.conf location&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="sasl.kerberos.service.name" elementType="Argument"> <stringProp name="Argument.name">sasl.kerberos.service.name</stringProp> <stringProp name="Argument.value">kafka</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="sasl.mechanism" elementType="Argument"> <stringProp name="Argument.name">sasl.mechanism</stringProp> <stringProp name="Argument.value">GSSAPI</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.enabled" elementType="Argument"> <stringProp name="Argument.name">ssl.enabled</stringProp> <stringProp name="Argument.value">NO</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.key.password" elementType="Argument"> <stringProp name="Argument.name">ssl.key.password</stringProp> <stringProp name="Argument.value">&lt;Key Password&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.keystore.location" elementType="Argument"> <stringProp name="Argument.name">ssl.keystore.location</stringProp> <stringProp name="Argument.value">&lt;Keystore Location&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.keystore.password" elementType="Argument"> <stringProp name="Argument.name">ssl.keystore.password</stringProp> <stringProp name="Argument.value">&lt;Keystore Password&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.truststore.location" elementType="Argument"> <stringProp name="Argument.name">ssl.truststore.location</stringProp> <stringProp name="Argument.value">&lt;Truststore Location&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.truststore.password" elementType="Argument"> <stringProp name="Argument.name">ssl.truststore.password</stringProp> <stringProp name="Argument.value">&lt;Truststore Password&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="client.id" elementType="Argument"> <stringProp name="Argument.name">client.id</stringProp> <stringProp name="Argument.value"></stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="security.providers" elementType="Argument"> <stringProp name="Argument.name">security.providers</stringProp> <stringProp name="Argument.value"></stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.enabled.protocols" elementType="Argument"> <stringProp name="Argument.name">ssl.enabled.protocols</stringProp> <stringProp name="Argument.value">TLSv1.2,TLSv1.3</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.endpoint.identification.algorithm" elementType="Argument"> <stringProp name="Argument.name">ssl.endpoint.identification.algorithm</stringProp> <stringProp name="Argument.value">&lt;Ssl identification algorithm&gt;</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.keymanager.algorithm" elementType="Argument"> <stringProp name="Argument.name">ssl.keymanager.algorithm</stringProp> <stringProp name="Argument.value">SunX509</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.keystore.type" elementType="Argument"> <stringProp name="Argument.name">ssl.keystore.type</stringProp> <stringProp name="Argument.value">JKS</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.provider" elementType="Argument"> <stringProp name="Argument.name">ssl.provider</stringProp> <stringProp name="Argument.value"></stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="ssl.protocol" elementType="Argument"> <stringProp name="Argument.name">ssl.protocol</stringProp> <stringProp name="Argument.value">TLSv1.3</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="auto.register.schemas" elementType="Argument"> <stringProp name="Argument.name">auto.register.schemas</stringProp> <stringProp name="Argument.value">true</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="apicurio.avro.confluent.compatibility" elementType="Argument"> <stringProp name="Argument.name">apicurio.avro.confluent.compatibility</stringProp> <stringProp name="Argument.value">NO</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="apicurio.avro.header.id" elementType="Argument"> <stringProp name="Argument.name">apicurio.avro.header.id</stringProp> <stringProp name="Argument.value">YES</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> </collectionProp> </elementProp> <stringProp name="classname">com.sngular.kloadgen.sampler.KafkaProducerSampler</stringProp> </JavaSampler> <hashTree/> <com.sngular.kloadgen.config.valuesimple.ValueSimpleConfigElement guiclass="TestBeanGUI" testclass="com.sngular.kloadgen.config.valuesimple.ValueSimpleConfigElement" testname="KLG - Simple Value Config"> <stringProp name="messageSerializerProperty">org.apache.kafka.common.serialization.StringSerializer</stringProp> <stringProp name="messageType">string</stringProp> <stringProp name="messageValue">Cleverton</stringProp> </com.sngular.kloadgen.config.valuesimple.ValueSimpleConfigElement> <hashTree/> <com.sngular.kloadgen.config.keysimple.KeySimpleConfigElement guiclass="TestBeanGUI" testclass="com.sngular.kloadgen.config.keysimple.KeySimpleConfigElement" testname="KLG - Simple Key Config"> <stringProp name="keySerializerConfiguration">org.apache.kafka.common.serialization.StringSerializer</stringProp> <stringProp name="keyType">string</stringProp> <stringProp name="keyValue">name</stringProp> </com.sngular.kloadgen.config.keysimple.KeySimpleConfigElement> <hashTree/> </hashTree> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>true</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <sentBytes>true</sentBytes> <url>true</url> <threadCounts>true</threadCounts> <idleTime>true</idleTime> <connectTime>true</connectTime> </value> </objProp> <stringProp name="filename"></stringProp> </ResultCollector> <hashTree/> </hashTree> </hashTree> </jmeterTestPlan>

KloadGen Version

kloadgen-5.6.12

Relevant log output

2024-04-03 09:28:42,913 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2024-04-03 09:28:42,913 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2024-04-03 09:28:42,913 INFO o.a.j.p.j.s.JavaSampler: Created class: com.sngular.kloadgen.sampler.KafkaProducerSampler. Uses tearDownTest: 
2024-04-03 09:28:42,913 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2024-04-03 09:28:43,190 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2024-04-03 09:28:43,191 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2024-04-03 09:28:43,191 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2024-04-03 09:28:43,191 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false
2024-04-03 09:28:43,191 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2024-04-03 09:28:43,191 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2024-04-03 09:28:43,191 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2024-04-03 09:28:43,191 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2024-04-03 09:28:43,191 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[Thread Group 1-1,6,main]
java.lang.IncompatibleClassChangeError: Expected static method 'org.apache.jmeter.threads.JMeterVariables org.apache.jmeter.protocol.java.sampler.JavaSamplerContext.getJMeterVariables()'
	at com.sngular.kloadgen.sampler.KafkaProducerSampler.setupTest(KafkaProducerSampler.java:72) ~[kloadgen-5.6.12.jar:?]
	at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:194) ~[ApacheJMeter_java.jar:5.6.3]
	at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651) ~[ApacheJMeter_core.jar:5.6.3]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570) ~[ApacheJMeter_core.jar:5.6.3]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501) ~[ApacheJMeter_core.jar:5.6.3]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) ~[ApacheJMeter_core.jar:5.6.3]
	at java.base/java.lang.Thread.run(Thread.java:842) [?:?]
2024-04-03 09:28:43,191 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2024-04-03 09:28:43,191 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
2024-04-03 09:33:21,278 INFO o.r.Reflections: Reflections took 1502 ms to scan 1 urls, producing 4225 keys and 21730 values
2024-04-03 09:33:22,475 INFO o.r.Reflections: Reflections took 1101 ms to scan 1 urls, producing 4225 keys and 21730 values
2024-04-03 09:33:22,503 INFO o.r.Reflections: Reflections took 16 ms to scan 1 urls, producing 19 keys and 45 values
2024-04-03 09:33:22,503 WARN o.a.j.t.g.GenericTestBeanCustomizer: No editor for property: keySchemaProperties type: interface java.util.List in bean: KLG - Key Schema Deserializer Config

Have you added your JMX Testplan or a replica?

  • I have added a JMX testplan

Have you added your Schema or a replica?

  • I have added the Schema
Copy link

github-actions bot commented Apr 3, 2024

Thank you for collaborating with the project by giving us feedback! In case it applies, it would be helpful if you could attach an example AVRO and an example test plan for us to reproduce the error. Cheers!

@cleverton-heusner cleverton-heusner changed the title Start a simple project with Simple Value Config and Simple Key Config Starting a simple project with Simple Value Config and Simple Key Config Apr 3, 2024
@cleverton-heusner
Copy link
Author

cleverton-heusner commented Apr 3, 2024

The bug doesn't happen when I change the kloadgen version to kloadgen-5.6.7.
The JMeter and Java version keep the sames.

@janDuinRod
Copy link
Contributor

Hi!
Could you please try this again using JMeter version 5.6.2 and KLoadGen's last version (5.6.12)?
If this doesn't work please let us know and we'll get to it as soon as possible.

@janDuinRod janDuinRod self-assigned this Apr 30, 2024
@janDuinRod
Copy link
Contributor

Hi!
Did using those versions work?

@janDuinRod
Copy link
Contributor

I will close this issue, as I assume it is now working. If there are any problems still do not doubt contacting us again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants