I am using logstash 1.5.5. I am using "sed" command to replace ELASTICSEARCH_HOST variable in my logstash.conf file. But when I start logstash with such a conf file, I see that logstash cannot talk to Elasticsearch. Below is the exception (which doesn't happen when I hardcode elasticsearch host name in my .conf file)
WARNING: [logstash-logstash-1-1hghb-9-12028] failed to send ping to [[#zen_unicast_1#][logstash-1-1hghb][inet[elasticsearch/172.30.252.250:9200]]]
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][inet[elasticsearch/172.30.252.250:9200]][internal:discovery/zen/unicast_gte_1_4] request_id [0] timed out after [3751ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:529)
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)
Stacktrace on ES
[2015-12-15 21:13:34,349][WARN ][http.netty ] [Carmilla Black] Caught exception while handling client http traffic, closing connection [id: 0x3f480996, /172.17.42.1:53893 => /172.17.0.107:9200]
java.lang.IllegalArgumentException: empty text
at org.elasticsearch.common.netty.handler.codec.http.HttpVersion.(HttpVersion.java:89)
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:191)
at org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:102)
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)
What am I doing wrong? Any help?