# Logstash ElasticSearch IOException :

**URL:** <https://discuss.elastic.co/t/logstash-elasticsearch-ioexception/29664>\
**Category:** Logstash\
**Created:** [September 20, 2015, 4:14pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-ioexception/29664 "2015-09-20T16:14:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenjaminD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamind/32/4866_2.png) [@BenjaminD](https://discuss.elastic.co/u/BenjaminD)\
**Post date:** [September 20, 2015, 4:14pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-ioexception/29664/1 "2015-09-20T16:14:38Z")

</div>

Hi all,

I'm trying to use Logstash and ElasticSearch for the first time and I get some troubles doing so.

ES version : 1.7.2 (also tried with 2.0.0 beta2 for the same result).  
Logstash version : 1.5.4

The context : I'm using the logstash [JDBC plugin](https://www.elastic.co/blog/logstash-jdbc-input-plugin) and when trying to index a table content in ES, I have an exception :

```
    [2015-09-20 13:08:42,238][WARN][http.netty] [Willie Lumpkin] Caught exception while handling client http traffic, closing connection [id: 0x729e1f0d, /127.0.0.1:64177 => /127.0.0.1:9200]
java.io.IOException: Une connexion existante a dû être fermée par l’hôte distant
	at sun.nio.ch.SocketDispatcher.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
	at sun.nio.ch.IOUtil.read(IOUtil.java:192)
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
	at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
	at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
	at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
	at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
	at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
	at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

```

My Logstash conf file is as follow :

```
input {
    jdbc {
        # Postgres jdbc connection string to our database, mydb
        jdbc_connection_string => "jdbc:postgresql://localhost:5432/Dell"
        # The user we wish to execute our statement as
        jdbc_user => "postgres"
		# The password
		jdbc_password => " ****"
        # The path to our downloaded jdbc driver
        jdbc_driver_library => "postgresql-9.1-901.jdbc4.jar"
        # The name of the driver class for Postgresql
        jdbc_driver_class => "org.postgresql.Driver"
        # our query
        statement => "SELECT * from products"
    }
}
output {
	stdout { codec => json_lines }
    elasticsearch {
        protocol => http
        index => "products"
        document_type => "product"
        document_id => "%{uid}"
        host => "127.0.0.1"
    }
}

```

If I run a

```
curl localhost:9200/_cluster/health/?pretty

```

before indexing, the cluster status is green. After trying to index, it turns yellow.

```
{
  "cluster_name" : "elasticsearch",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 10,
  "active_shards" : 10,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 10,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0
}

```

The stdout output for Logstash works fine.

Thanks for your help.

PS : if I run any command on Logstash, it works but I get the following message :

```
io/console not supported; tty will not be manipulated

```

---

<div class="post-metadata">

**Author:** ![BenjaminD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamind/32/4866_2.png) [@BenjaminD](https://discuss.elastic.co/u/BenjaminD)\
**Post date:** [September 28, 2015, 7:29am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-ioexception/29664/2 "2015-09-28T07:29:47Z")

</div>

I'm answering myself.  
I created a VM with Linux Mint on it. I copied ES and Logstash folders on this VM and tried to run it. It worked !  
My next concern is to have Kibana running with my datas.  
Regards.  
Benjamin

---

<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, 5:27am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-ioexception/29664/3 "2017-07-06T05:27:53Z")

</div>


