# Filebeat not able to connect to Logstatsh - Getting ERR Failed to connect: dial tcp XX.XX.XXX.X:5044: i/o timeout

**URL:** <https://discuss.elastic.co/t/filebeat-not-able-to-connect-to-logstatsh-getting-err-failed-to-connect-dial-tcp-xx-xx-xxx-x-5044-i-o-timeout/117202>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 26, 2018, 2:13pm UTC](https://discuss.elastic.co/t/filebeat-not-able-to-connect-to-logstatsh-getting-err-failed-to-connect-dial-tcp-xx-xx-xxx-x-5044-i-o-timeout/117202 "2018-01-26T14:13:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vijai](https://avatars.discourse-cdn.com/v4/letter/v/ed8c4c/32.png) [@Vijai](https://discuss.elastic.co/u/Vijai)\
**Post date:** [January 26, 2018, 2:13pm UTC](https://discuss.elastic.co/t/filebeat-not-able-to-connect-to-logstatsh-getting-err-failed-to-connect-dial-tcp-xx-xx-xxx-x-5044-i-o-timeout/117202/1 "2018-01-26T14:13:36Z")

</div>

Hello, I'm trying to do a POC on ELK + Filebeat. I configured the entire setup on my local machine and it works fine. Filebeats is able to establish a connection to Logstash.

But when I installed Filebeats on a remote server, it is unable to connect to Logstash. It is throwing below error..

2018-01-12T10:46:15Z INFO Non-zero metrics in the last 30s: beat.info.uptime.ms=30000 beat.memstats.gc\_next=7853760 beat.memstats.memory\_alloc=3993112 beat.memstats.memory\_total=32834728 filebeat.harvester.open\_files=1 filebeat.harvester.running=1 libbeat.config.module.running=0 libbeat.pipeline.clients=1 libbeat.pipeline.events.active=2864 registrar.states.current=1  
2018-01-12T10:46:15Z DBG [prospector] Run prospector  
2018-01-12T10:46:15Z DBG [prospector] Start next scan  
2018-01-12T10:46:15Z DBG [prospector] Check file for harvesting: /home/bgnft/Vijai\_NFT/POC\_Logs/TraceRequest2  
2018-01-12T10:46:15Z DBG [prospector] Update existing file for harvesting: /home/bgnft/Vijai\_NFT/POC\_Logs/TraceRequest2, offset: 642408  
2018-01-12T10:46:15Z DBG [prospector] Harvester for file is still running: /home/bgnft/Vijai\_NFT/POC\_Logs/TraceRequest2  
2018-01-12T10:46:15Z DBG [prospector] Prospector states cleaned up. Before: 1, After: 1  
_ **2018-01-12T10:46:16Z ERR Failed to connect: dial tcp XX.XX.XXX.X:5044: i/o timeout** _  
2018-01-12T10:46:16Z DBG [logstash] connect  
2018-01-12T10:46:20Z DBG [harvester] End of file reached: /home/bgnft/Vijai\_NFT/POC\_Logs/TraceRequest2; Backoff now.

I'm able to Ping my local machine from Remote server. Checking with Network team if any firewall is blocking the port. Apart from this, any thing else I need to check.

Logstash Configuration

input {  
beats {  
port =\> 5600  
}  
}

filter {

```
grok {
  match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:log_level} %{GREEDYDATA:Action} %{GREEDYDATA:Protocol_IP} Request trace start: %{USERNAME:Userid} %{GREEDYDATA:Method} %{GREEDYDATA:URL}" }
}
	}

```

output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "logs1"  
}  
stdout {  
codec =\> rubydebug  
}  
}

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [January 26, 2018, 2:41pm UTC](https://discuss.elastic.co/t/filebeat-not-able-to-connect-to-logstatsh-getting-err-failed-to-connect-dial-tcp-xx-xx-xxx-x-5044-i-o-timeout/117202/2 "2018-01-26T14:41:59Z")

</div>

Hi @Vijai,

I would say that if it's working locally but fails over the network, it looks like a firewall issue. I don't see anything obvious in your settings, so that would be my bet. You can check if the port is open using other tools like `nmap`.

Best regards

---

<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:** [February 23, 2018, 2:42pm UTC](https://discuss.elastic.co/t/filebeat-not-able-to-connect-to-logstatsh-getting-err-failed-to-connect-dial-tcp-xx-xx-xxx-x-5044-i-o-timeout/117202/3 "2018-02-23T14:42:08Z")

</div>

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