title: connect filebeat to logstash
body: <p>I am trying to setup filebeat to logstash and get below errors at filebeat and logstash end:</p>
  <p>filebeat; Version: 7.7.0
  logstash  &quot;number&quot; : &quot;7.8.0&quot;</p>
  <ol>
  <li><p>Modified /etc/filebeat/filebeat.yml:</p>
  <p>enabled: true
  paths:
  commented output.elasticsearch
  uncommented output.logstash and added hosts: [&quot;hostname:5044&quot;]</p>
  </li>
  <li><p>Modified /etc/logstash/conf.d/beats_elasticsearch.conf:</p>
  <p>input {
  beats {
  port =&gt; 5044
  }
  }</p>
  <p>#filter {
  #}</p>
  <p>output {
  elasticsearch {
  hosts =&gt; [&quot;hostname:9200&quot;]
  }
  }</p>
  </li>
  </ol>
  <p>I started filebeat and got below error:</p>
  <pre><code>2020-07-06T08:51:23.912-0700    ERROR   [publisher_pipeline_output]     pipeline/output.go:106  Failed to connect to backoff(elasticsearch(http://hostname:5044)): Get http://hostname:5044: dial tcp ip_address:5044: connect: connection refused
  </code></pre>
  <p>Started logstash and its log below:</p>
  <pre><code>[INFO ] 2020-07-06 09:00:20.562 [[main]&lt;beats] Server - Starting server on port: 5044
  [INFO ] 2020-07-06 09:00:20.835 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=&gt;9600}
  [INFO ] 2020-07-06 09:00:45.266 [defaultEventExecutorGroup-4-1] BeatsHandler - [local: x.x.x.x:5044, remote: y.y.y.y:53628] Handling exception: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 71
  [WARN ] 2020-07-06 09:00:45.267 [nioEventLoopGroup-2-2] DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
  io.netty.handler.codec.DecoderException: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 71
  </code></pre>
  <p>Please explain what else I should do.</p>
  <p>Started filebeat and logstash as:</p>
  <pre><code>sudo /usr/share/filebeat/bin/filebeat -e -c /etc/filebeat/filebeat.yml
  sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/beats_elasticsearch.conf
  </code></pre>
  <p>Thanks</p>