logstash-codec-protobuf icon indicating copy to clipboard operation
logstash-codec-protobuf copied to clipboard

[ERROR][logstash.codecs.protobuf ] Unable to load file: /usr/share/logstash/compiled_protobuf/logical_port_extended.pb.rb. Reason: #<RuntimeError: Field already exists for tag: 1

Open xijq227 opened this issue 4 years ago • 3 comments

Error message

[2020-05-12T07:23:16,693][ERROR][logstash.codecs.protobuf ] Unable to load file: /usr/share/logstash/compiled_protobuf/logical_port_extended.pb.rb. Reason: #<RuntimeError: Field already exists for tag: 1>

Pipeline configuration

input {
  udp {
    port => 50000
    codec => protobuf
    {
      class_name => 'TelemetryStream'
      class_file => '/usr/share/logstash/compiled_protobuf/port_extended.pb.rb'
      protobuf_root_directory => '/usr/share/logstash/compiled_protobuf/'
      protobuf_version => 2
    }
  }
  udp {
    port => 50001
    codec => protobuf
    {
      class_name => 'TelemetryStream'
      class_file => '/usr/share/logstash/compiled_protobuf/logical_port_extended.pb.rb'
      protobuf_root_directory => '/usr/share/logstash/compiled_protobuf/'
      protobuf_version => 2
    }
  }
}
filter {
 
}

output {
    if [sensor_name] == '\/junos\/system\/linecard\/interface\/logical\/usage\/' {
      elasticsearch {
        index => 'jti_logical_usage'
        hosts => ["http://es01:9200","http://es02:9200","http://es03:9200"]
      }
    }
    if [sensor_name] == '\/junos\/system\/linecard\/interface\/' {
      elasticsearch {
        index => 'jti_interface'
        hosts => ["http://es01:9200","http://es02:9200","http://es03:9200"]
      }
    }
}

Specifications

logstash:7.6.2

Additional information

It works well if I only use ONE udp input.

[2020-05-12T07:22:03,238][INFO ][logstash.javapipeline    ][main] Pipeline started {"pipeline.id"=>"main"}
[2020-05-12T07:22:03,336][INFO ][logstash.inputs.udp      ][main] Starting UDP listener {:address=>"0.0.0.0:50000"}
[2020-05-12T07:22:03,357][INFO ][logstash.agent           ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2020-05-12T07:22:03,393][INFO ][logstash.inputs.udp      ][main] UDP listener started {:address=>"0.0.0.0:50000", :receive_buffer_bytes=>"106496", :queue_size=>"2000"}

xijq227 avatar May 12 '20 07:05 xijq227

@xijq227 can you provide the protobuf definitions please? Thanks

IngaFeick avatar Sep 03 '20 11:09 IngaFeick

@xijq227 can you provide the protobuf definitions please? Thanks

port_extended.pb.rb logical_port_extended.pb.rb

xijq227 avatar Sep 11 '20 07:09 xijq227

Hi @xijq227

Did you fix your issue?,

Regards

3fr61n avatar Mar 11 '21 14:03 3fr61n