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

DNS nxdomain crashes logstash instead of pipeline #73

Open maederm opened 2 years ago

maederm commented 2 years ago

Hi

When plugin logstash-input-s3-sns-sqs can't resolve sqs.eu-central-1.amazonaws.com it crashes the whole logstash process instead of just the pipeline that is running the plugin.

I would expect a dns resolving failure not to crash the whole logstash process.

How to reproduce

This is the relevant config:

input{
    s3snssqs {
    region => "eu-central-1"
    access_key_id => "xxx"
    secret_access_key => "xxx"
    queue => "xxx"
    delete_on_success => true
    from_sns => false
    id => "xxx"
    add_field => { "[@metadata][log_type]" => "xxx" }
  }
}

After that you see the whole logstash process crashing with:

[2022-05-31T18:10:17,279][FATAL][logstash.runner          ] An unexpected error occurred! {:error=>#<Seahorse::Client::NetworkingError: Failed to open TCP connection to sqs.eu-central-1.amazonaws.com:443 (initialize: name or service not known)>[...]
[2022-05-31T18:10:17,325][FATAL][org.logstash.Logstash    ] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.20.1.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?]
        at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]

Best Regards, maederm