I am getting apache Flume events from Avro Sink into Logstash but messages are not correctly decoded from logstash-codec-avro.
Some ideas how to solve it would be very helpful
My logstash conf looks like:
input {
tcp {
port => 42001
codec => avro { schema_uri => "/tmp/schema.avsc" }
}
}
output {
stdout {
codec => rubydebug
#codec => avro { schema_uri => "/tmp/schema.avsc"}
}
}
schema.avsc:
{
"type": "record",
"namespace": "com.example",
"name": "FullName",
"fields": [
{"name":"first","type":"string"}
]
}
Outputs
An error occurred. Closing connection {:exception=>ArgumentError: negative length -2 given>,
{
"first" => R\u0019\xD0\u0005\x80\xAA\xC4\u0012\v\nR\xF3R\x9C\u0012K\x923\x80z\x84\x99\u0018䪕\xD22\x8B\x8AK\x94",
"@version" => "1",
"@timestamp" => "2016-11-04T15:57:56.083Z",
"host" => "127.0.0.1",
"port" => 42574
}