# Failing to connect to AWS OpenSearch from Logstash

**URL:** <https://forum.opensearch.org/t/failing-to-connect-to-aws-opensearch-from-logstash/8574>\
**Category:** OpenDistro\
**Tags:** troubleshoot\
**Created:** [February 8, 2022, 4:06pm UTC](https://forum.opensearch.org/t/failing-to-connect-to-aws-opensearch-from-logstash/8574 "2022-02-08T16:06:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexz00](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alexz00](https://forum.opensearch.org/u/alexz00)\
**Post date:** [February 8, 2022, 4:06pm UTC](https://forum.opensearch.org/t/failing-to-connect-to-aws-opensearch-from-logstash/8574/1 "2022-02-08T16:06:05Z")

</div>

Hi,  
we are trying to connect from Logstash (with OpenSearch output plugin) to AWS OpenSearch, but we’re continuously getting errors like:

[2022-02-07T05:04:42,614][WARN][logstash.outputs.opensearch] Restored connection to OpenSearch instance {:url=\>“[https://usr](https://usr):pwd@…es.amazonaws.com:443/”}  
[2022-02-07T05:04:42,640][ERROR][logstash.outputs.opensearch] Could not connect to cluster {:url=\>“[https://usr](https://usr):pwd@…es.amazonaws.com:443/”, :distribution=\>nil, :major\_version=\>7}

We have configured OpenSearch with basic HTTP auth and provided the credentials in Logstash output plugin. Credentials are fine, and we’re managing to connect to the same OpenSearch instance from the same box from java (Apache HTTP client, etc.).

Do you have any idea about why we’re getting these errors from Logstash?

Note: same configuration is working fine in other environments where we use OpenSearch (not the AWS version)…

Thanks

---

<div class="post-metadata">

**Author:** ![dtaivpp](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/dtaivpp/32/2814_2.png) [@dtaivpp](https://forum.opensearch.org/u/dtaivpp)\
**Post date:** [February 8, 2022, 4:23pm UTC](https://forum.opensearch.org/t/failing-to-connect-to-aws-opensearch-from-logstash/8574/2 "2022-02-08T16:23:57Z")

</div>

Can you share your configuration for Logstash (with the user and password censored as well)?

---

<div class="post-metadata">

**Author:** ![alexz00](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alexz00](https://forum.opensearch.org/u/alexz00)\
**Post date:** [February 8, 2022, 4:42pm UTC](https://forum.opensearch.org/t/failing-to-connect-to-aws-opensearch-from-logstash/8574/3 "2022-02-08T16:42:13Z")

</div>

Hi, sure:

opensearch {  
sniffing =\> false  
manage\_template =\> false  
index =\> “myindex-%{+YYYY.MM.dd}”  
pipeline =\> “mypipeline”  
hosts =\> [“https://…es.amazonaws.com:443”]  
ssl =\> true  
truststore =\> “/…/my\_truststore.p12”  
truststore\_password =\> “password”  
user =\> “user”  
password =\> “password”   
}

---

<div class="post-metadata">

**Author:** ![vamshin](https://avatars.discourse-cdn.com/v4/letter/v/c5a1d2/32.png) [@vamshin](https://forum.opensearch.org/u/vamshin)\
**Post date:** [February 8, 2022, 8:10pm UTC](https://forum.opensearch.org/t/failing-to-connect-to-aws-opensearch-from-logstash/8574/4 "2022-02-08T20:10:01Z")

</div>

@alexz00 Did you try enabling compatibility mode setting for OpenSearch domain?

 ![Screen Shot 2022-02-08 at 12.07.52 PM](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/8/8e32024ef95dd7c2ac1e692a3ff590d1cfa2b969.png)

---

<div class="post-metadata">

**Author:** ![alexz00](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alexz00](https://forum.opensearch.org/u/alexz00)\
**Post date:** [February 9, 2022, 2:42pm UTC](https://forum.opensearch.org/t/failing-to-connect-to-aws-opensearch-from-logstash/8574/5 "2022-02-09T14:42:21Z")

</div>

Thanks, disabling the compatibility mode indeed fixed the issue (it was enabled because we were using the Elasticsearch output plugin previously).
