# Filebeat can't pull to lofstash with x-pack

**URL:** <https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 19, 2017, 5:30am UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487 "2017-10-19T05:30:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dees7](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@Dees7](https://discuss.elastic.co/u/Dees7)\
**Post date:** [October 19, 2017, 5:30am UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/1 "2017-10-19T05:30:54Z")

</div>

I [installed](https://www.elastic.co/guide/en/x-pack/current/installing-xpack.html) x-pack to elastic, logstash, kibana and now filebeat can't sent to logstash:

```
 ERR Connecting error publishing events (retrying): read tcp 192.168.100.2:54230->192.168.100.2:5044: i/o timeout

```

I configure filebeat to pull directly to elastic with this [HowTo](https://www.elastic.co/guide/en/x-pack/current/beats.html). It works well.

But I need use pull through logstash.  
Please, help to configure it (cant find manual)?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 23, 2017, 12:27pm UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/2 "2017-10-23T12:27:43Z")

</div>

Can you share your filebeat output and logstash input configuration?

---

<div class="post-metadata">

**Author:** ![Dees7](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@Dees7](https://discuss.elastic.co/u/Dees7)\
**Post date:** [October 24, 2017, 4:27am UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/3 "2017-10-24T04:27:30Z")

</div>

logstash config:

```
input {
beats {
    type => "log"
    port => 5044
    ssl => true
    ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
    ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
    }
 #I tried this:
 #user => packetbeat_internal
 #password => changeme
}

```

filebeat config:

```
   filebeat.prospectors:
       - input_type: log
         paths:
              - /var/log/nginx/access.log
              - /var/log/nginx/error.log
         fields: {log_type: nginx}
   output.logstash:
         hosts: ["localhost:5044"]
         ssl.certificate_authorities: ["/etc/pki/tls/certs/logstash-forwarder.crt"]
         username: "packetbeat_internal"
         password: "changeme"
```

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 24, 2017, 12:52pm UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/4 "2017-10-24T12:52:34Z")

</div>

logstash has no additinal authentication options. Use TLS client authentication if you want to authenticate clients.

The I/O timeout is filebeat waiting for ACK from logstash. Which logstash version are you using?

---

<div class="post-metadata">

**Author:** ![Dees7](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@Dees7](https://discuss.elastic.co/u/Dees7)\
**Post date:** [October 25, 2017, 3:07am UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/5 "2017-10-25T03:07:19Z")

</div>

logstash 5.6.3  
filebeat 5.6.3

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 25, 2017, 12:46pm UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/6 "2017-10-25T12:46:49Z")

</div>

Can you try without TLS?

Have you checked with netstat if the connection is still open in LS? Have you had a look at logstash logs?

You can also try to increate the `timeout` setting in filebeat. But default is already at `60s`.

Is logstash stuck on the output? Try a minimal config like:

```auto
input {
  beats { port => 5044 }
}
output {
  stdout {
    codec => dots
  }
}

```

and filebeat:

```auto
filebeat.prospectors:
- input_type: log
  paths:
    - /var/log/nginx/access.log
    - /var/log/nginx/error.log
   fields.log_type: nginx
output.logstash:
  hosts: ["localhost:5044"]

```

Is this configuration working for you?

---

<div class="post-metadata">

**Author:** ![Dees7](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@Dees7](https://discuss.elastic.co/u/Dees7)\
**Post date:** [October 30, 2017, 6:57am UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/7 "2017-10-30T06:57:44Z")

</div>

Thanks. It works without TLS. And I found one more error. I forgot login\password

```
output {
    elasticsearch {
    user => logstash_internal
    password => changeme1
    }}
```

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 30, 2017, 12:50pm UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/8 "2017-10-30T12:50:55Z")

</div>

Next let us try with TLS enabled:

filebeat.yml

```auto
filebeat.prospectors:
- input_type: log
  paths:
    - /var/log/nginx/access.log
    - /var/log/nginx/error.log
   fields.log_type: nginx
output.logstash:
  hosts: ["localhost:5044"]
  ssl.certificate_authorities: ["/etc/pki/tls/certs/logstash-forwarder.crt"]

```

and logstash:

```auto
input {
  beats {
    port => 5044
    ssl => true
    ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
    ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
  }
}
output {
  stdout {
    codec => dots
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 27, 2017, 12:51pm UTC](https://discuss.elastic.co/t/filebeat-cant-pull-to-lofstash-with-x-pack/104487/9 "2017-11-27T12:51:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
