0

I can see an error in my logs that Subject with name A.Abc-key is not present. I listed all the subjects and verified that the A.Abc-key is not present but the A.Abc-value is present

On checking property-key for same Topic i get following error :

./kafka-avro-console-consumer --bootstrap-server http://localhost:9092 --from-beginning --property print.key=true --topic A.Abc

null    Processed a total of 1 messages
[2018-09-05 16:26:45,470] ERROR Unknown error when running consumer:  (kafka.tools.ConsoleConsumer$:76)
org.apache.kafka.common.errors.SerializationException: Error deserializing Avro message for id 80
Caused by: java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect(Native Method)

I am not sure hot to debug and fix this.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Divyanshu Jimmy
  • 2,542
  • 5
  • 32
  • 48

1 Answers1

1

Your error is HTTP related, so make sure your registry is running on localhost since you have not specified it

and verified that the A.Abc-key is not present

Then your key is not Avro, but Avro console consumer will try to deserialize your keys as Avro if you add the print key property

You can try adding key-deserializer and if your registry is not on localhost, you must specify it

--property schema.registry.url="http://..." \
--property key-deserializer=org.apache.kafka.common.serialization.StringDeserializer \
--property print.key=true
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245