logstash-input-s3-sns-sqs
logstash-input-s3-sns-sqs copied to clipboard
DNS nxdomain crashes logstash instead of pipeline
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" }
}
}
- Create a multi pipeline logstash config, where one pipeline uses s3snssqs
- Run logstash and let it connect successfully to sqs
- Set this in dnsmasq config:
address=/sqs.eu-central-1.amazonaws.com/
so it stops resolving
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