confluent-6.1.1/bin/kafka-avro-console-producer --broker-list localhost:9092 --topic cassandra-sink-topic --property value.schema='{"type":"record","name":"myrecord","fields":[{"name":"language","type":"string"},{"name":"users_count","type":"string"}]}'
{"language":"LISP","users_count":"4000"}
org.apache.kafka.common.errors.SerializationException: Error registering Avro schema{"type":"record","name":"myrecord","fields":[{"name":"language","type":"string"},{"name":"users_count","type":"string"}]}
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 2]; error code: 50005
at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:295)
at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:355)
at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:498)
at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:489)
at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:462)
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.registerAndGetId(CachedSchemaRegistryClient.java:214)
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:276)
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:252)
at io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.serializeImpl(AbstractKafkaAvroSerializer.java:84)
at io.confluent.kafka.formatter.AvroMessageReader$AvroMessageSerializer.serialize(AvroMessageReader.java:168)
at io.confluent.kafka.formatter.SchemaMessageReader.readMessage(SchemaMessageReader.java:317)
at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:51)
at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala
The schema registry process was not running due to conflict with spark UI port 8081.
1 Like
Hi @kkhambadkone . Looks like you were able to resolve the issue
That’s great
Hi @kkhambadkone ,
Just a quick tip: If you format your computer input/output (code, logs, stack trace, etc) using the code button </> then the post becomes much more readable and we have found that it makes it much more likely that people read and respond to such posts faster