question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue when using Kafka File Load Generator Config

See original GitHub issue

Hi all, I use the plugin to send Avro-Kafka records. With the schema registry it works fine, great plugin.

Unfortunately loading Avro-schemes via file does not work for me. I use the Example-Test-Plan.jmx and replaced the Kafka Load Generator Config with a Kafka File Load Generator Config element.

This leads to the following error messages:

Error 1:

2020-06-08 14:17:26,190 ERROR n.c.k.l.i.AvroLoadGenerator: Please make sure that properties data type and expression function return type are compatible with each other
io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Subject not found.; error code: 40401
	at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:230) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:256) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.rest.RestService.getLatestVersion(RestService.java:515) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.rest.RestService.getLatestVersion(RestService.java:507) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getLatestSchemaMetadata(CachedSchemaRegistryClient.java:275) ~[kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.input.AvroSchemaProcessor.getSchemaBySubject(AvroSchemaProcessor.java:266) ~[kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.input.AvroSchemaProcessor.<init>(AvroSchemaProcessor.java:86) ~[kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.loadgen.impl.AvroLoadGenerator.<init>(AvroLoadGenerator.java:18) [kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.config.fileserialized.FileSerializedConfigElement.iterationStart(FileSerializedConfigElement.java:39) [kloadgen-1.5.0.jar:?]
	at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:391) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.control.GenericController.next(GenericController.java:160) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.control.LoopController.next(LoopController.java:135) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:92) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) [ApacheJMeter_core.jar:5.2.1]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Error 2:

2020-06-08 14:17:26,191 ERROR n.c.k.c.f.FileSerializedConfigElement: Failed to create AvroLoadGenerator instance
net.coru.kloadgen.exception.KLoadGenException: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Subject not found.; error code: 40401
	at net.coru.kloadgen.loadgen.impl.AvroLoadGenerator.<init>(AvroLoadGenerator.java:21) ~[kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.config.fileserialized.FileSerializedConfigElement.iterationStart(FileSerializedConfigElement.java:39) [kloadgen-1.5.0.jar:?]
	at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:391) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.control.GenericController.next(GenericController.java:160) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.control.LoopController.next(LoopController.java:135) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:92) [ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) [ApacheJMeter_core.jar:5.2.1]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Subject not found.; error code: 40401
	at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:230) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:256) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.rest.RestService.getLatestVersion(RestService.java:515) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.rest.RestService.getLatestVersion(RestService.java:507) ~[kloadgen-1.5.0.jar:?]
	at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getLatestSchemaMetadata(CachedSchemaRegistryClient.java:275) ~[kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.input.AvroSchemaProcessor.getSchemaBySubject(AvroSchemaProcessor.java:266) ~[kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.input.AvroSchemaProcessor.<init>(AvroSchemaProcessor.java:86) ~[kloadgen-1.5.0.jar:?]
	at net.coru.kloadgen.loadgen.impl.AvroLoadGenerator.<init>(AvroLoadGenerator.java:18) ~[kloadgen-1.5.0.jar:?]

Error 3:

2020-06-08 14:17:26,202 ERROR n.c.k.s.ConfluentKafkaSampler: Failed to Generate message

I have tried different schemes. For example the Avro scheme as JSON file:

{
    "type" : "record",
    "namespace" : "test",
    "name" : "test",
    "fields" : [
       { "name" : "value1" , "type" : "string" },
       { "name" : "value2" , "type" : "int" }
    ]
 }

JMeter configuration (based on the Example-Test.json file):

Kafka File Load Generator Config: kafka_file_load

Schema-Registry Config Element: sr-success

Kafka Producer Properties; sampler

I suspect that this is a configuration problem. Does anyone see the problem?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kszoszecommented, Jun 8, 2020

Hi Benedikt, that’s really odd. My apologizes. We will take a look into it. Thanks for your feedback

0reactions
benediktwetzelcommented, Jul 21, 2020

Okay. Maybe I’ll open a question issue, but probably I’ll just push the schema manually and use the Kafka Load Generator Config.

Thanks again for the support!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka File Load Generator Config Element Issue and Errors #77
When I leave the subject fields blank under Value Schema Load Generator Config, it passes with blank payload. The problem seems to be...
Read more >
Kafka Producer Configurations for Confluent Platform
The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load...
Read more >
Kafka Load Testing with JMeter - OctoPerf
Overview of performance testing Kafka, a publish/subscribe messaging system, with JMeter. How to publish messages onto a Kafka topic?
Read more >
org.apache.kafka.common.KafkaException: Failed to construct ...
It has nothing to do with your configuration; it's a class loader problem. Use -verbose JVM arg to see which jars classes are...
Read more >
Apache Kafka Reference Guide - Quarkus
Testing using a Kafka broker ... You can configure the topic attribute to override it. ... This strategy should not be used in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found