# FileBeat cant connect to Logstash

**URL:** <https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 17, 2019, 7:43pm UTC](https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879 "2019-09-17T19:43:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ghaith\_Haddad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghaith_haddad/32/49288_2.png) [@Ghaith\_Haddad](https://discuss.elastic.co/u/Ghaith_Haddad)\
**Post date:** [September 17, 2019, 7:43pm UTC](https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879/1 "2019-09-17T19:43:19Z")

</div>

Hello everyone, so i installed ELK on a server and filebeat on a client and it was working fine. now that im going to prod env i did the same thing but filebeat cant for some reason reach logstash.  
Im using aws instances, any help or guides are greatly appreciated.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Tek\_Chand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tek_chand/32/34318_2.png) [@Tek\_Chand](https://discuss.elastic.co/u/Tek_Chand)\
**Post date:** [September 18, 2019, 4:52am UTC](https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879/2 "2019-09-18T04:52:51Z")

</div>

@Ghaith_Haddad,

First of all please check that your logstash machine is reachable on port 5044 from machine where you installed filebeat.

You can check using below command:

```auto
telnet logstash_machine_ip 5044

```

If you are unable to telnet then you need to set firewall rule. If you are able to telnet then please provide some error log from filebeat.

Note:- If you are using some other port rather then 5044 please use that port.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Ghaith\_Haddad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghaith_haddad/32/49288_2.png) [@Ghaith\_Haddad](https://discuss.elastic.co/u/Ghaith_Haddad)\
**Post date:** [September 18, 2019, 2:06pm UTC](https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879/3 "2019-09-18T14:06:09Z")

</div>

Hello @Tek_Chand,

thank you for your reply, i cant telnet to the logstash machine even though the firewall rules are set properly, but it seems that logstash is listening on ipv6 instead of ipv4. Any idea why?

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME  
java 14980 logstash 104u IPv6 135663 0t0 TCP \*:5044 (LISTEN)

---

<div class="post-metadata">

**Author:** ![Tek\_Chand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tek_chand/32/34318_2.png) [@Tek\_Chand](https://discuss.elastic.co/u/Tek_Chand)\
**Post date:** [September 19, 2019, 3:51am UTC](https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879/4 "2019-09-19T03:51:50Z")

</div>

@Ghaith_Haddad,

> [@Ghaith\_Haddad](#):
>
> but it seems that logstash is listening on ipv6 instead of ipv4. Any idea why?

At my end also logstash is listening on ipv6 and its working fine. ELK team also confirm same in below post:

[logstash on ipv6](https://discuss.elastic.co/t/logstash-listening-on-tcp6-only/82026)

So it seems firewall rule or service issue. Please check the logstash log also is there any error?

Thanks.

---

<div class="post-metadata">

**Author:** ![0x00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/0x00/32/52748_2.png) [@0x00](https://discuss.elastic.co/u/0x00)\
**Post date:** [September 19, 2019, 4:05am UTC](https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879/5 "2019-09-19T04:05:38Z")

</div>

While it should work with ipv6 you might look at this github thread (below) for reference. Did you also ensure that your firewall has the right ipv6 permissions in the allow rules? For instance `10.0.0.1` in ipv4 can be written `0:0:0:0:0:ffff:a00:1` in ipv6.

> <https://github.com/elastic/elasticsearch/issues/16994>

ipv4 to ipv6 conversion tool:

[https://www.ultratools.com/tools/ipv4toipv6](https://www.ultratools.com/tools/ipv4toipv6)

---

<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:** [October 17, 2019, 4:05am UTC](https://discuss.elastic.co/t/filebeat-cant-connect-to-logstash/199879/6 "2019-10-17T04:05:43Z")

</div>

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