# Error file logstash configuration

**URL:** <https://discuss.elastic.co/t/error-file-logstash-configuration/52445>\
**Category:** Logstash\
**Created:** [June 10, 2016, 2:18pm UTC](https://discuss.elastic.co/t/error-file-logstash-configuration/52445 "2016-06-10T14:18:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tantely](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tantely](https://discuss.elastic.co/u/tantely)\
**Post date:** [June 10, 2016, 2:18pm UTC](https://discuss.elastic.co/t/error-file-logstash-configuration/52445/1 "2016-06-10T14:18:39Z")

</div>

Hello everybody,  
I'm using logstash to connect with my database sql server  
the purpose is to send all data in my table to elasticsearch  
see below my logstash.conf  
input {  
jdbc {  
jdbc\_driver\_library =\> "c:\program files (x86)\microsoft jdbc driver 4.0 for sql server\sqljdbc\_4.0\fra\sqljdbc4.jar"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
jdbc\_connection\_string =\> "jdbc:sqlserver://localhost:1433;user=\*\*\*;password=\*\*\*;databaseName=base1"  
jdbc\_user =\> "\*\*\*"  
jdbc\_password =\> "\*\*\*"  
statement =\> "select \*  
from tb\_elastic\_search"  
}  
}  
filter {  
}  
output {  
elasticsearch {  
host =\> "127.0.0.1:9200"  
index =\> "moderatus"  
document\_type =\> "tb\_elastic\_search"  
document\_id =\> "%{int\_content\_id}"  
protocol =\> "http"  
}  
stdout { codec =\> rubydebug }  
}  
when i run /bin\>logstash -f logstash.config  
I get the error below :  
reason=\>"The setting `host` in plugin `elasticsearch` is obsolete and is no longer available.  
Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format. If you have any questions about this, you are invited to visit [https://discuss.elastic.co/c/logstash](https://discuss.elastic.co/c/logstash) and ask.", :level=\>:error}←[0m  
The signal HUP is in use by the JVM and will not work correctly on this platform

If someone has an idea to help me, it's very gratefull slight\_smile:

thank you so much

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 10, 2016, 2:25pm UTC](https://discuss.elastic.co/t/error-file-logstash-configuration/52445/2 "2016-06-10T14:25:49Z")

</div>

> [@tantely](#):
>
> The setting host in plugin elasticsearch is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format.

This error message seem quite clear to me. All the configuration parameters available for the current version of the plugin are further described in [the documentation](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts).

---

<div class="post-metadata">

**Author:** ![tantely](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tantely](https://discuss.elastic.co/u/tantely)\
**Post date:** [June 10, 2016, 2:32pm UTC](https://discuss.elastic.co/t/error-file-logstash-configuration/52445/3 "2016-06-10T14:32:33Z")

</div>

thank you for your reply  
I change host to hosts with array value i.e hosts =\> ["127.0.0.1:9200"] but i get the same error  
if you have an idea wink:  
I am a beginner for logstash, elasticsearch, if someone could help me 😉

---

<div class="post-metadata">

**Author:** ![juliann](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@juliann](https://discuss.elastic.co/u/juliann)\
**Post date:** [December 22, 2016, 1:09pm UTC](https://discuss.elastic.co/t/error-file-logstash-configuration/52445/4 "2016-12-22T13:09:46Z")

</div>

Are you running on Windows? Try

`hosts => ["localhost:9200"]`

I have had problems using the loopback address on Windows.

---

<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 6, 2017, 4:29am UTC](https://discuss.elastic.co/t/error-file-logstash-configuration/52445/5 "2017-07-06T04:29:44Z")

</div>


