Output logstash not start


(Jungmi) #1

Logstash 1.5.1 Elasticsearch 1.4.2

I tried to move from A index aggregated data to B index. but I can't let Logstash output start. here is log message and config file. I don't know what config is wrong.

  Failed to bind to [9300]
org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(org/elasticsearch/transport/netty/NettyTransport.java:405)
org.elasticsearch.transport.netty.NettyTransport.doStart(org/elasticsearch/transport/netty/NettyTransport.java:269)
org.elasticsearch.common.component.AbstractLifecycleComponent.start(org/elasticsearch/common/component/A bstractLifecycleComponent.java:85)
org.elasticsearch.transport.TransportService.doStart(org/elasticsearch/transport/TransportService.java:153)
org.elasticsearch.common.component.AbstractLifecycleComponent.start(org/elasticsearch/common/component/AbstractLifecycleComponent.java:85)
org.elasticsearch.node.internal.InternalNode.start(org/elasticsearch/node/internal/InternalNode.java:248)
org.elasticsearch.node.NodeBuilder.node(org/elasticsearch/node/NodeBuilder.java:166)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:606)
RUBY.build_client(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/local_gems/ea01ca4d/logstash-output-    elasticsearch-0.2.9/lib/logstash/outputs/elasticsearch/protocol.rb:218)
RUBY.client(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/local_gems/ea01ca4d/logstash-output-elasticsearch-0.2.9/lib/logstash/outputs/elasticsearch/protocol.rb:16)
RUBY.initialize(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/local_gems/ea01ca4d/logstash-output-elasticsearch-    0.2.9/lib/logstash/outputs/elasticsearch/protocol.rb:153)
RUBY.register(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/local_gems/ea01ca4d/logstash-output-elasticsearch-0.2.9/lib/logstash/outputs/elasticsearch.rb:419)
org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
RUBY.start_outputs(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/pipeline.rb:163)
RUBY.run(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/pipeline.rb:82)
RUBY.execute(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/agent.rb:150)
RUBY.run(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/runner.rb:91)
org.jruby.RubyProc.call(org/jruby/RubyProc.java:271)
RUBY.run(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/runner.rb:96)
org.jruby.RubyProc.call(org/jruby/RubyProc.java:271)
RUBY.initialize(/Users/jungmi/uniSearch/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/stud-0.0.20/lib/stud/task.rb:12)
java.lang.Thread.run(java/lang/Thread.java:745)

This is my logstash config

input {
# Read all documents from Elasticsearch matching the given query
elasticsearch {
hosts => ["192.168.x.x"]
index => "score_log"
type => "keyword_score"
#port => 9200
size => 0
docinfo => true
scan =>  false
query => '{"size":0, "aggs":{"terms_keyword":{"terms".....}'
 }
}
output {
  elasticsearch {
host =>  "192.168.x.x"
cluster => "elasticsearch"
index => "score_temp"
node_name => "Logstash-out"
bind_host => "192.168.x.x"
bind_port => 9300
document_type => "keyword_score"
manage_template => false
}
stdout {codec => rubydebug}
}

(Mark Walkom) #2

Is ES running and listening on 9300?


(Jungmi) #3

no on 9200. And Index A an B is on same ES server. I don't know that in this case is valid environment.


(Mark Walkom) #4

Except you are using the node protocol which uses port 9300.

Maybe try switching to HTTP protocol instead.


(강용균) #5

output 부분을 아래와 같이 한번 해보시면 될 것 같습니다.

output {
elasticsearch {
host => "192.168.x.x"
cluster => "elasticsearch"
index => "score_temp"
node_name => "Logstash-out"
bind_host => "192.168.x.x"
bind_port => 9300
document_type => "keyword_score"
manage_template => false
protocol => "transport"
}


(Magnus Bäck) #6

Why are you setting bind_host and bind_port? It seems like Logstash is having problems binding to port 9300, but that's where one would expect ES to be listening.


(system) #7