cherweg / logstash-input-s3-sns-sqs

logstash input downloading files from s3 Bucket by OjectKey from SNS/SQS
Other
29 stars 35 forks source link

Set Codec: Version 1.4.5 :error=>#<LocalJumpError: unexpected return #5

Closed cherweg closed 6 years ago

cherweg commented 6 years ago

We have ruby 2.x bug in our code.

  def hash_key_is_regex(myhash)
    myhash.default_proc = lambda do |hash, lookup|
      hash.each_pair do |key, value|
        return value if %r[#{key}] =~ lookup.to_s
      end
    end

return value is not allowed from inside a block.

An unexpected error occurred! {:error=>#<LocalJumpError: unexpected return>, :backtrace=>["/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:477:in `block in hash_key_is_regex'", "org/jruby/RubyHash.java:1343:in `each'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:476:in `block in hash_key_is_regex'", "org/jruby/RubyHash.java:711:in `default'", "org/jruby/RubyHash.java:1100:in `[]'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:203:in `block in handle_message'", "org/jruby/RubyArray.java:1734:in `each'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:193:in `handle_message'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:446:in `block in thread_runner'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/sqs/queue_poller.rb:413:in `block in yield_messages'", "org/jruby/RubyArray.java:1734:in `each'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/sqs/queue_poller.rb:412:in `yield_messages'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/sqs/queue_poller.rb:405:in `block in process_messages'", "org/jruby/RubyKernel.java:1114:in `catch'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/sqs/queue_poller.rb:404:in `process_messages'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/sqs/queue_poller.rb:336:in `block in poll'", "org/jruby/RubyKernel.java:1292:in `loop'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/sqs/queue_poller.rb:331:in `block in poll'", "org/jruby/RubyKernel.java:1114:in `catch'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/sqs/queue_poller.rb:330:in `poll'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:445:in `block in thread_runner'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:463:in `run_with_backoff'", "/Users/cherweg/Downloads/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-s3-sns-sqs-1.4.5/lib/logstash/inputs/s3snssqs.rb:444:in `block in thread_runner'"]}