I am currently working with elasticsearch, logstash and kibana.
I get an exception that I cannot get through.
first, this is what i get when i put ip: 9200 / _cluster / health in my browser.
{ "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 }
This is what the kibana gets when trying to request an elastic search
Remote Address:ip:9200 Request ip:9200/_all/_search Request Method:POST Status Code:200 OK
Everything seems to be fine so far.
Here is my logstash configuration file:
input { gelf { port => "5000" } udp { port => "5001" } } output { file { path => "/home/g/stdout.log" } elasticsearch { cluster => "mr-cluster" codec => "json" } }
Something pretty simple when I use only the file as it works fine, logstash works. The problem is when I want to use elasticsearch as output, nothing else works (the output of the event file), and I get this exception from elasticsearch. I searched Google for many hours and couldn’t find a solution.
Here is the exception:
[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 => /0:0:0:0:0:0:0:1:9200] java.lang.IllegalArgumentException: empty text at org.elasticsearch.common.netty.handler.codec.http.HttpVersion.<init>(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)
Thank you for helping the guys!
elasticsearch logstash kibana
bottus
source share