# Filebeat connection refused to logstash

**URL:** <https://discuss.elastic.co/t/filebeat-connection-refused-to-logstash/232049>\
**Category:** Beats\
**Created:** [May 11, 2020, 2:53pm UTC](https://discuss.elastic.co/t/filebeat-connection-refused-to-logstash/232049 "2020-05-11T14:53:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andre\_Martins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_martins/32/68071_2.png) [@Andre\_Martins](https://discuss.elastic.co/u/Andre_Martins)\
**Post date:** [May 11, 2020, 2:53pm UTC](https://discuss.elastic.co/t/filebeat-connection-refused-to-logstash/232049/1 "2020-05-11T14:53:06Z")

</div>

Hi

I'm a newbie, so please bare with me.  
For couple of days I've been trying to figure out why I can't make logstash to listen to the port 5141.

At the conf.d I have

15-dns-syslog.conf

```auto
       beats {
       port => 5141
       type => "logs"
       tags => ["pihole","5141"]
       }
}

```

at filebeat.yml I have

```auto
filebeat.modules:
- module: logstash
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/pihole.log
name: elk-hole
output.logstash:
enabled: true
hosts: ["127.0.0.1:5141"]

```

If I use netstat I can see that there is nothing listen on 5141. I don't know what is wrong.

Any help is welcome. thanks

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [May 11, 2020, 7:12pm UTC](https://discuss.elastic.co/t/filebeat-connection-refused-to-logstash/232049/2 "2020-05-11T19:12:51Z")

</div>

Hey @Andre_Martins, welcome to discuss 🙂

This seems to be a problem with the Logstash configuration, could you see any error in Logstash logs?

I think that the logstash configuration you are adding should be placed in the pipelines directory.

---

<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:** [June 8, 2020, 9:12pm UTC](https://discuss.elastic.co/t/filebeat-connection-refused-to-logstash/232049/3 "2020-06-08T21:12:53Z")

</div>

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