-
Notifications
You must be signed in to change notification settings - Fork 147
Description
Logstash information:
Please include the following information:
- Logstash version (e.g.
bin/logstash --version)
7.16.2 - Logstash installation source (e.g. built from source, with a package manager: DEB/RPM, expanded from tar or zip archive, docker)
docker - How is Logstash being run (e.g. as a service/service manager: systemd, upstart, etc. Via command line, docker/kubernetes)
kubernetes - How was the Logstash Plugin installed
Shipped with logstash 7.16.2
Description of the problem including expected versus actual behavior:
We have set up an interface endpoint for our S3 service and access S3 bucket via that interface endpoint. when S3 input plugin is configured to use that interface endpoint we get an error saying Name or service unknown
Here is our configuration:
input {
s3 {
bucket => <our_bucket>
type => ...
sincedb_path =>...
prefix => ...
region => "us-east-1"
endpoint => "https://<our_vpc_endpoint_id>.s3.us-east-1.vpce.amazonaws.com"
}
Here is the error we get
[ERROR] 2022-01-25 07:31:54.612 [[main]<s3] javapipeline - A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::S3 bucket=>"<our_bucket>", endpoint=>"https://<<our_vpc_endpoint_id>.s3.us-east-1.vpce.amazonaws.com", prefix=>...., id=>...., type=>"elb", sincedb_path=>...., region=>"us-east-1", enable_metric=>true, codec=>"plain_82c47ed3-633f-4f89-b7ef-6a154796b950", enable_metric=>true, charset=>"UTF-8">, role_session_name=>"logstash", delete=>false, interval=>60, watch_for_new_files=>true, temporary_directory=>"/tmp/logstash", include_object_properties=>false, gzip_pattern=>".gz(ip)?$">
Error: Failed to open TCP connection to <our_bucket>.<our_vpc_endpoint_id>.s3.vpce.amazonaws.com:443 (initialize: name or service not known)
Exception: Seahorse::Client::NetworkingError
Stack: uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:943:in `block in connect'
org/jruby/ext/timeout/Timeout.java:114:in `timeout'
org/jruby/ext/timeout/Timeout.java:90:in `timeout'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/n
From this error message
Error: Failed to open TCP connection to <our_bucket>.<our_vpc_endpoint_id>.s3.vpce.amazonaws.com:443 (initialize: name or service not known)
Its clear that region is being replaced from the actual endpoint url (actual should be <our_bucket>.<our_vpc_endpoint_id>.s3.us-east-1.vpce.amazonaws.com with the region)
Steps to reproduce:
Please include a minimal but complete recreation of the problem,
including (e.g.) pipeline definition(s), settings, locale, etc. The easier
you make for us to reproduce it, the more likely that somebody will take the
time to look at it.
1.Set up a interface endpoint for S3 -> https://docs.aws.amazon.com/AmazonS3/latest/userguide/privatelink-interface-endpoints.html
2.Use the interface endpoint as endpoint in S3 plugin
3.Deploy the logstash
Provide logs (if relevant):