Logstash ElasticSearch IOException :

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 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

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