Issues connecting to connecting to elasticsearch from logstash using stdin input

Logstash is not able to connect to elasticsearch and giving errors in loop ,

attaching the dump with --debug flag in logstash

Logstash startup completed

send this message from stdin to elastic search
←[36moutput received {:event=>{"message"=>"send this message from stdin to elastic search\r", "@version"=>"1", "@timestamp"=>"2015-05-27T17:08:37.742Z", "type"=

"human", "inputsource"=>"stdin", "host"=>"PriyankuK-MSL"}, :level=>:debug, :file=>"(eval)", :line=>"25", :method=>"output_func"}←[0m
2015-05-27T17:08:37.742Z PriyankuK-MSL send this message from stdin to elastic search
←[36mFlushing output {:outgoing_count=>1, :time_since_last_flush=>50.355, :outgoing_events=>{nil=>[["index", {:id=>nil, :index=>"logstash-2015.05.27", :_type=
"human", :routing=>nil}, #@metadataaccessors=#@store={"retry_count"=>0}, @lut={}>, @cancelled
=false, @data={"message"=>"send this message from stdin to elastic search\r", "@version"=>"1", "@timestamp"=>"2015-05-27T17:08:37.742Z", "type"=>"human", "input
source"=>"stdin", "host"=>"PriyankuK-MSL"}, @metadata={"retry_count"=>0}, @accessors=#@store={"message"=>"send this messag
e from stdin to elastic search\r", "@version"=>"1", "@timestamp"=>"2015-05-27T17:08:37.742Z", "type"=>"human", "inputsource"=>"stdin", "host"=>"PriyankuK-MSL"},
@lut={"type"=>[{"message"=>"send this message from stdin to elastic search\r", "@version"=>"1", "@timestamp"=>"2015-05-27T17:08:37.742Z", "type"=>"human", "inp
utsource"=>"stdin", "host"=>"PriyankuK-MSL"}, "type"], "inputsource"=>[{"message"=>"send this message from stdin to elastic search\r", "@version"=>"1", "@timest
amp"=>"2015-05-27T17:08:37.742Z", "type"=>"human", "inputsource"=>"stdin", "host"=>"PriyankuK-MSL"}, "inputsource"], "host"=>[{"message"=>"send this message fro
m stdin to elastic search\r", "@version"=>"1", "@timestamp"=>"2015-05-27T17:08:37.742Z", "type"=>"human", "inputsource"=>"stdin", "host"=>"PriyankuK-MSL"}, "hos
t"], "message"=>[{"message"=>"send this message from stdin to elastic search\r", "@version"=>"1", "@timestamp"=>"2015-05-27T17:08:37.742Z", "type"=>"human", "in
putsource"=>"stdin", "host"=>"PriyankuK-MSL"}, "message"]}>>]]}, :batch_timeout=>1, :force=>nil, :final=>nil, :level=>:debug, :file=>"/Priyanku/elasticsearch/lo
gstash/logstash-1.5.0/vendor/bundle/jruby/1.9/gems/stud-0.0.19/lib/stud/buffer.rb", :line=>"207", :method=>"buffer_flush"}←[0m
←[36mSending bulk of actions to client[0]: localhost {:level=>:debug, :file=>"/Priyanku/elasticsearch/logstash/logstash-1.5.0/vendor/bundle/jruby/1.9/gems/logst
ash-output-elasticsearch-0.2.4-java/lib/logstash/outputs/elasticsearch.rb", :line=>"461", :method=>"flush"}←[0m
←[31mGot error to send bulk of actions to elasticsearch server at localhost : blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];[SERVICE_UNA
VAILABLE/2/no master]; {:level=>:error, :file=>"/Priyanku/elasticsearch/logstash/logstash-1.5.0/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-0.2.4
-java/lib/logstash/outputs/elasticsearch.rb", :line=>"464", :method=>"flush"}←[0m
←[33mFailed to flush outgoing items {:outgoing_count=>1, :exception=>org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/s
tate not recovered / initialized];[SERVICE_UNAVAILABLE/2/no master];, :backtrace=>["org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(org/ela
sticsearch/cluster/block/ClusterBlocks.java:151)", "org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedRaiseException(org/elasticsearch/cluster/block/Cl
usterBlocks.java:141)", "org.elasticsearch.action.bulk.TransportBulkAction.executeBulk(org/elasticsearch/action/bulk/TransportBulkAction.java:210)", "org.elasti
csearch.action.bulk.TransportBulkAction.access$000(org/elasticsearch/action/bulk/TransportBulkAction.java:73)", "org.elasticsearch.action.bulk.TransportBulkActi
on$1.onFailure(org/elasticsearch/action/bulk/TransportBulkAction.java:148)", "org.elasticsearch.action.support.TransportAction$ThreadedActionListener$2.run(org/
elasticsearch/action/support/TransportAction.java:137)", "java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1142)",
"java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:617)", "java.lang.Thread.run(java/lang/Thread.java:745)"], :le
vel=>:warn, :file=>"/Priyanku/elasticsearch/logstash/logstash-1.5.0/vendor/bundle/jruby/1.9/gems/stud-0.0.19/lib/stud/buffer.rb", :line=>"231", :method=>"buffer
_flush"}←[0m

below is the logstash configuration file

input {
stdin {
add_field => {inputsource => "stdin"}
type => "human" # string (optional)
}
}

output {
stdout {
}
elasticsearch {
host => localhost
}
}

org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/s
tate not recovered / initialized];[SERVICE_UNAVAILABLE/2/no master

Your ES cluster doesn't look healthy. What's the output of

curl localhost:9200/_cluster/health?pretty

?

{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,

"active_primary_shards" : 9,
"active_shards" : 9,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 9,
"number_of_pending_tasks" : 0
}

I am running elastic search on windows though .I see the satus as yellow but nor sure what am i supposed to do about it