# Logstash connection to Elasticsearch issue

**URL:** <https://discuss.elastic.co/t/logstash-connection-to-elasticsearch-issue/218911>\
**Category:** Logstash\
**Created:** [February 12, 2020, 7:17am UTC](https://discuss.elastic.co/t/logstash-connection-to-elasticsearch-issue/218911 "2020-02-12T07:17:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pszemesy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Post date:** [February 12, 2020, 7:17am UTC](https://discuss.elastic.co/t/logstash-connection-to-elasticsearch-issue/218911/1 "2020-02-12T07:17:23Z")

</div>

Hi All,  
I have a logstash on an external site and an ES within the local network.  
The ES can be reached from the site where the logstash is located via an HA-Proxy ([https://myapp.mycompany.hu](https://myapp.mycompany.hu) --\> [http://myapp.mycompany.local:9200](http://myapp.mycompany.local:9200))

If I run a logstash pipeline like this:  
input {  
jdbc {  
jdbc\_validate\_connection =\> true  
jdbc\_driver\_library =\> "/usr/share/logstash/logstash-core/lib/jars/mariadb-java-client-2.5.4.jar"  
jdbc\_driver\_class =\> "Java::org.mariadb.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mariadb://127.0.0.1:3306/my\_dbl"  
jdbc\_user =\> "my\_db\_user"  
jdbc\_password =\> "password"  
statement =\> "SELECT \* FROM table"  
}  
}  
filter {  
}  
output {  
elasticsearch {  
hosts =\> ["[https://myapp.mycompany.hu:443](https://myapp.mycompany.hu:443)"]  
index =\> "test\_index"  
user =\> "elastic"  
password =\> "password"  
}  
}

I receive the following in the log:  
[WARN] 2020-02-12 08:05:54.977 [[main]-pipeline-manager] elasticsearch - Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[https://elastic:xxxxxx@myapp.mycompany.hu:443/](https://elastic:xxxxxx@myapp.mycompany.hu:443/)", :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=\>"Got response code '503' contacting Elasticsearch at URL '[https://myapp.mycompany.hu:443/](https://myapp.mycompany.hu:443/)'"}

While if I check this from curl:  
curl -XGET "[https://elastic:password@myapp.mycompany.hu:443](https://elastic:password@myapp.mycompany.hu:443)"  
I get the following:  
{  
"name" : "node-1",  
"cluster\_name" : "my\_cluster",  
"cluster\_uuid" : "ehdSQUgcTWam-m2cx\_KzUg",  
"version" : {  
"number" : "7.5.2",  
"build\_flavor" : "default",  
"build\_type" : "deb",  
"build\_hash" : "8bec50e1e0ad29dad5653712cf3bb580cd1afcdf",  
"build\_date" : "2020-01-15T12:11:52.313576Z",  
"build\_snapshot" : false,  
"lucene\_version" : "8.3.0",  
"minimum\_wire\_compatibility\_version" : "6.8.0",  
"minimum\_index\_compatibility\_version" : "6.0.0-beta1"  
},  
"tagline" : "You Know, for Search"  
}

Please help me what I do wrong! Thx.

---

<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:** [March 11, 2020, 7:17am UTC](https://discuss.elastic.co/t/logstash-connection-to-elasticsearch-issue/218911/2 "2020-03-11T07:17:34Z")

</div>

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