# Elasticsearch - Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"http://199.192.23.237:9200/", :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :Connection refused (Connection refused)"

**URL:** <https://discuss.elastic.co/t/elasticsearch-attempted-to-resurrect-connection-to-dead-es-instance-but-got-an-error-url-http-199-192-23-237-9200-error-type-logstash-hostunreachableerror-connection-refused-connection-refused/187720>\
**Category:** Logstash\
**Created:** [June 27, 2019, 5:44am UTC](https://discuss.elastic.co/t/elasticsearch-attempted-to-resurrect-connection-to-dead-es-instance-but-got-an-error-url-http-199-192-23-237-9200-error-type-logstash-hostunreachableerror-connection-refused-connection-refused/187720 "2019-06-27T05:44:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nere\_Rasolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nere_rasolo/32/48154_2.png) [@nere\_Rasolo](https://discuss.elastic.co/u/nere_Rasolo)\
**Post date:** [June 27, 2019, 5:44am UTC](https://discuss.elastic.co/t/elasticsearch-attempted-to-resurrect-connection-to-dead-es-instance-but-got-an-error-url-http-199-192-23-237-9200-error-type-logstash-hostunreachableerror-connection-refused-connection-refused/187720/1 "2019-06-27T05:44:36Z")

</div>

_-I use openJdk 1.8_

* * *

\*-Elasticsearch 6.8.1+Logstash 6.8.1+mysql \*

* * *

\*-My file elasticsearch/elasticsearch.yml : \*

**cluster.name: mamaison**

**node.name: server1.bonjour**

**path.data: /var/lib/elasticsearch**

**path.logs: /var/log/elasticsearch**

**network.host: 0.0.0.0**

**http.port: 9200**

**action.auto\_create\_index: true**  
**http.cors.enabled: true**  
**http.cors.allow-origin: "/.\*/"**  
**http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE**  
**http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization"**

* * *

* * *

\*\*-My file logstash/config/mamaison.config : \*\*  
_input {  
jdbc{  
jdbc\_driver\_library =\> "/home/xxxx/driver/mysql-connector-java-8.0.12.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/nom\_base"  
jdbc\_user =\> "user"  
jdbc\_password =\> "xxxx"  
schedule =\> "_ \* \* \* \*"  
statement =\> "SELECT \* from mamaison"  
}  
}  
filter{  
json{  
source =\> "ville"  
target =\> "ville"  
}  
json{  
source =\> "region"  
target =\> "region"  
}  
json{  
source =\> "caracteristique"  
target =\> "caracteristique"  
}  
json{  
source =\> "type\_annonce"  
target =\> "type\_annonce"  
}  
json{  
source =\> "category"  
target =\> "category"  
}  
json{  
source =\> "quartier"  
target =\> "quartier"  
}  
json{  
source =\> "user"  
target =\> "user"  
}  
}  
output {  
stdout { codec =\> json\_lines }  
elasticsearch {  
hosts =\> "199.192.23.237:9200"  
index =\> "mamaison"  
document\_type =\> "annonces"  
action =\> 'update'  
document\_id =\> '%{id}'  
doc\_as\_upsert =\> "true"  
}  
}

* * *

The error is in the output elasticsearch. Connection refused but the configuration of elasticsearch is great and listen on this port:

tcp6 0 0 :::9200 :::\* LISTEN 18817/java  
tcp6 0 0 :::9300 :::\* LISTEN 18817/java

* * *

- And the service is started :

● elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
Active: active (running) since lkm 2019-06-27 05:33:14 UTC; 19min ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Main PID: 18817 (java)  
CGroup: /system.slice/elasticsearch.service  
├─18817 /bin/java -Xms200m -Xmx200m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.ca...  
└─18879 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86\_64/bin/controller

jon 27 05:33:14 systemd[1]: Started Elasticsearch.

* * *

- It's work with curl 199.192.23.237 :

curl -XGET 199.192.23.237:9200

{  
"name" : "server1.bonjour",  
"cluster\_name" : "mamaison",  
"cluster\_uuid" : "y09N-Ed4T7Of5fYCOefchg",  
"version" : {  
"number" : "6.8.1",  
"build\_flavor" : "default",  
"build\_type" : "rpm",  
"build\_hash" : "1fad4e1",  
"build\_date" : "2019-06-18T13:16:52.517138Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.7.0",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"

---

<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:** [July 25, 2019, 5:44am UTC](https://discuss.elastic.co/t/elasticsearch-attempted-to-resurrect-connection-to-dead-es-instance-but-got-an-error-url-http-199-192-23-237-9200-error-type-logstash-hostunreachableerror-connection-refused-connection-refused/187720/2 "2019-07-25T05:44:36Z")

</div>

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