# Logstash s3 error Failed to open TCP connection

**URL:** <https://discuss.elastic.co/t/logstash-s3-error-failed-to-open-tcp-connection/304068>\
**Category:** Logstash\
**Created:** [May 5, 2022, 9:01pm UTC](https://discuss.elastic.co/t/logstash-s3-error-failed-to-open-tcp-connection/304068 "2022-05-05T21:01:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swev](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@swev](https://discuss.elastic.co/u/swev)\
**Post date:** [May 5, 2022, 9:01pm UTC](https://discuss.elastic.co/t/logstash-s3-error-failed-to-open-tcp-connection/304068/1 "2022-05-05T21:01:27Z")

</div>

I have been trying to get the s3 plugin to work have been running into issues connecting to the url. The interest part is the url it reports in the error message is missing the region, which was referenced in the endpoint. What am I missing?

Error validating bucket write permissions! {:message=\>"Failed to open TCP connection to [bucket.xxxx-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.vpce.amazonaws.com:443](http://bucket.xxxx-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.vpce.amazonaws.com:443)

below you will notice that the region is dropped from the url even though its set in endpoint and region settings.

"[https://bucket.xxxx-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.us-east-1.vpce.amazonaws.com](https://bucket.xxxx-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.us-east-1.vpce.amazonaws.com)"  
[bucket.xxxx-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.vpce.amazonaws.com:443](http://bucket.xxxx-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.vpce.amazonaws.com:443)

s3 section:

```auto
    s3 {
      access_key_id => "XXXXXXXXXXXXXXXXXXXX"
      secret_access_key => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      endpoint => "https://bucket.xxxx-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.us-east-1.vpce.amazonaws.com"
      bucket => "dev-analytics"
      region => "us-east-1"
      size_file => 2048
      time_file => 5
      codec => "json"
      canned_acl => "bucket-owner-full-control"
      additional_settings => { "force_path_style" => "true" } 
    }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 2, 2022, 9:01pm UTC](https://discuss.elastic.co/t/logstash-s3-error-failed-to-open-tcp-connection/304068/2 "2022-06-02T21:01:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
