logstash-plugins / logstash-integration-kafka

Kafka Integration for Logstash, providing Input and Output Plugins
Apache License 2.0
32 stars 60 forks source link

Payload deserialization fails when basic auth is used with schema registry #95

Closed robbavey closed 3 years ago

robbavey commented 3 years ago

Steps to reproduce:

input {
kafka {
'schema_registry_url' => 'http://localhost:8081'
'schema_registry_key' => 'barney'
'schema_registry_secret' => 'changeme'
'topics' => ['authed']
'codec' => 'plain'
'group_id' => 'xxxx'
'auto_offset_reset' => 'earliest'
 'enable_auto_commit' => 'true' }
}

Observed Behaviour Once data starts flowing into the topic, the following error occurs:

org.apache.kafka.common.errors.SerializationException: Error deserializing key/value for partition authed-0 at offset 0. If needed, please seek past the record to continue consumption.
Caused by: org.apache.kafka.common.errors.SerializationException: Error retrieving Avro unknown schema for id 81
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Unauthorized; error code: 401
robbavey commented 3 years ago

Fixed by #94