# Logstash not able to connect to elastic search hosted on asw

**URL:** <https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737>\
**Category:** Logstash\
**Created:** [December 21, 2022, 8:46am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737 "2022-12-21T08:46:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivam585](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@shivam585](https://discuss.elastic.co/u/shivam585)\
**Post date:** [December 21, 2022, 8:46am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/1 "2022-12-21T08:46:36Z")

</div>

```auto
[2022-12-21T07:09:39,189][INFO][logstash.runner] Log4j configuration path used is: /etc/logstash/log4j2.properties
[2022-12-21T07:09:39,205][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"8.5.3", "jruby.version"=>"jruby 9.3.9.0 (2.6.8) 2022-10-24 537cd1f8bc OpenJDK 64-Bit Server VM 17.0.5$
[2022-12-21T07:09:39,210][INFO][logstash.runner] JVM bootstrap flags: [-Xms1g, -Xmx1g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.thresh$
[2022-12-21T07:09:42,291][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[2022-12-21T07:09:43,356][INFO][org.reflections.Reflections] Reflections took 179 ms to scan 1 urls, producing 125 keys and 438 values
$ility => v8` unless explicitly configured otherwise.
[2022-12-21T07:09:44,695][INFO][logstash.outputs.elasticsearch][main] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["https://esuserf$
[2022-12-21T07:09:45,225][INFO][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[https://user:xxxxxx@eshost$
[2022-12-21T07:09:46,021][ERROR][logstash.javapipeline][main] Pipeline error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Could not connect to a compatible version of Elastics$
[2022-12-21T07:09:46,027][INFO][logstash.javapipeline][main] Pipeline terminated {"pipeline.id"=>"main"}
[2022-12-21T07:09:46,041][ERROR][logstash.agent] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineActi$
[2022-12-21T07:09:46,173][INFO][logstash.runner] Logstash shut down.
[2022-12-21T07:09:46,197][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:790) ~[jruby.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:753) ~[jruby.jar:?]
        at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:91) ~[?:?]

```

My output configuration for logstash  
logstash 8.5.3 version  
elasticsearch version number" : "7.10.2"

```auto
output {
  stdout {
    codec => rubydebug
  }
  elasticsearch {
		hosts => ["https://eshost:443"]
    user => "es-user"
    password => "es-password"
		index => "logstash-%{+YYYY.MM.dd}" 
  } 
}

```

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [December 21, 2022, 8:55am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/2 "2022-12-21T08:55:01Z")

</div>

I believe you are trying to connect to OpenSearch? OpenSearch is different. You can't use Logstash `8.x` `elasticsearch` output to connect to OpenSearch.

---

<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:** [December 21, 2022, 8:55am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/3 "2022-12-21T08:55:02Z")

</div>

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![shivam585](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@shivam585](https://discuss.elastic.co/u/shivam585)\
**Post date:** [December 21, 2022, 8:57am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/4 "2022-12-21T08:57:29Z")

</div>

i am connecting to Elasticsearch hosted on aws to sync django logs to this particular index

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [December 21, 2022, 8:58am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/5 "2022-12-21T08:58:21Z")

</div>

Since you are using Elasticsearch `7.10.2`, you should be using Logstash `7.10.x` instead of `8.x`.

---

<div class="post-metadata">

**Author:** ![shivam585](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@shivam585](https://discuss.elastic.co/u/shivam585)\
**Post date:** [December 21, 2022, 9:00am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/6 "2022-12-21T09:00:09Z")

</div>

how can i install particular version of logstash could you please help

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [December 21, 2022, 9:01am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/7 "2022-12-21T09:01:59Z")

</div>

You can download past releases from [https://www.elastic.co/downloads/past-releases#logstash](https://www.elastic.co/downloads/past-releases#logstash), but you should upgrade your Elasticsearch to the latest `7.17.8` as `7.10` is EOL.

---

<div class="post-metadata">

**Author:** ![shivam585](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@shivam585](https://discuss.elastic.co/u/shivam585)\
**Post date:** [December 21, 2022, 9:06am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/8 "2022-12-21T09:06:19Z")

</div>

Also if we are using aws opensearch which agent we can use ?

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [December 21, 2022, 9:17am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/9 "2022-12-21T09:17:30Z")

</div>

You will need to check with AWS on that.

---

<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:** [January 18, 2023, 9:18am UTC](https://discuss.elastic.co/t/logstash-not-able-to-connect-to-elastic-search-hosted-on-asw/321737/10 "2023-01-18T09:18:07Z")

</div>

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