Filebeat not able to establish connection with my elk host machine

(Akash Katakam) #1

I installed filebeat on my dev server and wanted to fetch log files from there to another machine but when i try to run logstash.bat -f config.json on my elk machine it shows error in my console
←[31mAttempted to send a bulk request to Elasticsearch configured at '["http://http://localhost:9200/"]', but an error occurred and it failed! Are you sure you can reach elasticsea
rch from this machine using the configuration provided? {:client_config=>{:hosts=>["http://http://localhost:9200/"], :ssl=>nil, :transport_options=>{:socket_timeout=>0, :request_ti
meout=>0, :proxy=>nil, :ssl=>{}}, :transport_class=>Elasticsearch::Transport::Transport::HTTP::Manticore, :logger=>nil, :tracer=>nil, :reload_connections=>false, :retry_on_failure=

false, :reload_on_failure=>false, :randomize_hosts=>false}, :error_message=>"http", :error_class=>"Manticore::ResolutionFailure", :backtrace=>["F:/wo/logstash-2.1.1/vendor/bundle/
jruby/1.9/gems/manticore-0.4.4-java/lib/manticore/response.rb:35:in initialize'", "org/jruby/'", "F:/wo/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/manti
core-0.4.4-java/lib/manticore/response.rb:70:in call'", "F:/wo/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/manticore-0.4.4-java/lib/manticore/response.rb:245:incall_once'", "F:/
wo/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/manticore-0.4.4-java/lib/manticore/response.rb:148:in code'", "F:/wo/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/elasticsearch-trans port-1.0.15/lib/elasticsearch/transport/transport/http/manticore.rb:71:inperform_request'", "org/jruby/ call'", "F:/wo/logstash-2.1.1/vendor/bundle/jruby/1.9 /gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/base.rb:201:inperform_request'", "F:/wo/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/elasticsearch-trans
port-1.0.15/lib/elasticsearch/transport/transport/http/manticore.rb:54:in perform_request'", "F:/wo/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/ elasticsearch/transport/client.rb:125:inperform_request'", "F:/wo/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/elasticsearch-api-1.0.15/lib/elasticsearch/api/actions/bulk.rb:87:in

can someone tell me what exactly is the problem?

Filbeat version 1.0.1 installed on ubuntu server
ELK on windows
ES 2.1.1
logstash 2.1.1

i used the config.json as per the documentation

** logstash:**
** # The Logstash hosts**
** hosts: [""]**
** # Number of workers per Logstash host.**
** #worker: 1**

** # Optional load balance the events between the Logstash hosts**
** #loadbalance: true**

my filebeat config

(Christian Dahlqvist) #2

Looks like you have configured the Elasticsearch output plugin in Logstash incorrectly. Can you show your Logstash config?

(Akash Katakam) #3

codec => json
port => 5044

output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"

(Christian Dahlqvist) #4

The hosts parameter should not include 'http://'. See the documentation for an example.

(Akash Katakam) #5

yeah man thanks! but now it is showing logstash start up completed.but logs are not being pushed to elastic search

(Akash Katakam) #6

i tried giving file as an output it worked perfect.but when logstash as output we are getting this problem.Is there any chance that connection is not established between filebeat and logstash

(Christian Dahlqvist) #7

Please do not post screenshots of terminal windows when you can copy the relevant text instead. What does your input config look like in Logstash?

(system) #8