title: how to fix this code exception error elasticsearch
body: <p>I'm currently working with elasticsearch, logstash and kibana.</p>
  
  <p>i'm getting an exception that i can't get through.</p>
  
  <p>first here is what i get when i put ip:9200/_cluster/health in my browser ..</p>
  
  <pre><code>{
   "cluster_name":"mr-cluster",
   "status":"yellow",
   "timed_out":false,
   "number_of_nodes":1,
   "number_of_data_nodes":1,
   "active_primary_shards":5,
   "active_shards":5,
   "relocating_shards":0,
   "initializing_shards":0,
   "unassigned_shards":5
  }
  </code></pre>
  
  <p>Here is what kibana get when trying to request elastic search</p>
  
  <pre><code>Remote Address:ip:9200
  Request ip:9200/_all/_search
  Request Method:POST
  Status Code:200 OK
  </code></pre>
  
  <p>It seems okay until now ..</p>
  
  <p>Here is my logstash config file:</p>
  
  <pre><code>input {
  gelf {
      port =&gt; "5000"
  }
  udp {
      port =&gt; "5001"
  }
  }
  
  output {
  file {
      path =&gt; "/home/g/stdout.log"
  }
  elasticsearch {
      cluster =&gt; "mr-cluster"
      codec =&gt; "json"
  }
  }
  </code></pre>
  
  <p>Something pretty simple when i only use a file as output it works perfectly, logstash works.
  The problem is when i wanna use elasticsearch as output, nothing works anymore (event file output) and i get this exception from elasticsearch. I've been searching on google for hours now and didn't find the solution.</p>
  
  <p>Here is the exception :</p>
  
  <pre><code>[2014-05-21 09:18:35,060][WARN ][http.netty               ] [mr-node-elasticsearch] Caught     exception while handling client http traffic, closing connection [id: 0x27d0ccce, /0:0:0:0:0:0:0:1:44164 =&gt; /0:0:0:0:0:0:0:1:9200]
  java.lang.IllegalArgumentException: empty text
  at org.elasticsearch.common.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97)
  at org.elasticsearch.common.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:62)
  at org.elasticsearch.common.netty.handler.codec.http.HttpRequestDecoder.createMessage(HttpRequestDecoder.java:75)
  at org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:189)
  at org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:101)
  at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500)
  at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
  at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
  at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
  at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
  at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)
  at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
  at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
  at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
  at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
  at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
  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:318)
  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:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:744) 
  </code></pre>
  
  <p>Thank you for helping guys !</p>