# I/o timeout filebeat when send data to logstash

**URL:** https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412
**Category:** Beats
**Created:** [January 18, 2021, 11:05am UTC](https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412 "2021-01-18T11:05:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Eti\_Huri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eti_huri/32/82426_2.png) [@Eti\_Huri](https://discuss.elastic.co/u/Eti_Huri)
#### Post date: [January 18, 2021, 11:05am UTC](https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412/1 "2021-01-18T11:05:40Z")

</div>

Hi all:)  
I have my logstash vm and my application vm, they don't run in the same subnet  
I am trying send logs from my vm application to logstash vm  
this is my filebeat.yml

```auto
    filebeat.inputs:
    - type: log
      paths:
        - /home/ubuntu/releases/1.1.0/utsoft_fe/server/opdata/log/sql.log
    output.logstash:
        hosts: ["{logstash public ip}:5044"]
        enabled: true

```

and here my logstah.conf:

```auto
input {
    beats {
        port => "5044"
	host => "{private ip}"
	codec => plain {
		charset => "US-ASCII"
	}
    }
}
 filter {}
    output {
        elasticsearch {
            hosts => ["http://{public ip}:9200"]
        	user => "elastic"
        	password => '{my password}'
        }

        stdout{codec=> rubydebug}
    }

```

when I run the filebeat I get :  
`Failed to connect to backoff(async(tcp://{}:5044)): dial tcp {}:5044: i/o timeout`  
when I run "sudo ./filebeat test output"  
I get

```auto
  connection...
    parse host... OK
    dns lookup... OK
    addresses: {logstah public ip}
    dial up... ERROR dial tcp {logstah public ip}:5044: i/o timeout

```

when I start logstah I get:

```auto
    [INFO] 2021-01-18 10:37:32.809 [[main]-pipeline-manager] javapipeline - Pipeline Java execution initialization time {"seconds"=>2.76}
    [INFO] 2021-01-18 10:37:33.097 [[main]-pipeline-manager] beats - Starting input listener {:address=>"10.0.2.10:5044"}
    [INFO] 2021-01-18 10:37:33.162 [[main]-pipeline-manager] javapipeline - Pipeline started {"pipeline.id"=>"main"}
    [INFO] 2021-01-18 10:37:33.397 [Agent thread] agent - Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
    [INFO] 2021-01-18 10:37:33.756 [[main]<beats] Server - Starting server on port: 5044

```

when I check in logstah vm if I received the packages with this command:  
"sudo tcpdump -Xni eth0 port 5044"

I can see the pachages for example:

```auto
"10:49:34.806583 IP {my app vm}.53790 > 10.0.2.10.5044: Flags [S], seq 2443882348, win 64240, options [mss 1440,sackOK,TS val 394395986 ecr 0,nop,wscale 7], length 0
        0x0000: 4500 003c e27d 4000 3006 1dc0 0d43 3132 E..<.}@.0....C12
        0x0010: 0a00 020a d21e 13b4 91aa af6c 0000 0000 ...........l....
        0x0020: a002 faf0 c2e6 0000 0204 05a0 0402 080a ................
        0x0030: 1782 0152 0000 0000 0103 0307 ...R........
"

```

I tried to add ssl but it dosen't work

```auto
versions:
logstash 7.10.0
filebeat version 7.10.1
logstash-input-beats (6.0.13)

```

any ideas?  
thanks

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [January 18, 2021, 2:43pm UTC](https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412/2 "2021-01-18T14:43:22Z")

</div>

Could you check connectivity with logstash using telnet?

---

<div class="post-metadata">

### Author: ![Eti\_Huri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eti_huri/32/82426_2.png) [@Eti\_Huri](https://discuss.elastic.co/u/Eti_Huri)
#### Post date: [January 18, 2021, 2:56pm UTC](https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412/4 "2021-01-18T14:56:50Z")

</div>

if I run telnet {logstash\_public\_ip} 5044 I received: connection timeout  
but when I run telnet {logstash\_private\_ip} 5044 from logstash vm I get

Copy to clipboard

```auto
Trying 10.0.2.10...
Connected to 10.0.2.10.
Escape character is '^]'.

```

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [January 18, 2021, 3:14pm UTC](https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412/5 "2021-01-18T15:14:53Z")

</div>

It means that this is not an issue with Beats, but with your networking stack. I don't know if you're running this on a cloud provider or not, but you need to configure routing or filewall rules.

---

<div class="post-metadata">

### Author: ![Eti\_Huri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eti_huri/32/82426_2.png) [@Eti\_Huri](https://discuss.elastic.co/u/Eti_Huri)
#### Post date: [January 20, 2021, 7:49am UTC](https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412/6 "2021-01-20T07:49:27Z")

</div>

I create a new machine and installed there a logstash.  
now everything work, thank you:)

---

<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 17, 2021, 7:49am UTC](https://discuss.elastic.co/t/i-o-timeout-filebeat-when-send-data-to-logstash/261412/7 "2021-02-17T07:49:41Z")

</div>

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