# Filebeat to logstash - connectivity issue

**URL:** <https://discuss.elastic.co/t/filebeat-to-logstash-connectivity-issue/196686>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 26, 2019, 12:54am UTC](https://discuss.elastic.co/t/filebeat-to-logstash-connectivity-issue/196686 "2019-08-26T00:54:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Annamalai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arun_annamalai/32/46709_2.png) [@Arun\_Annamalai](https://discuss.elastic.co/u/Arun_Annamalai)\
**Post date:** [August 26, 2019, 12:54am UTC](https://discuss.elastic.co/t/filebeat-to-logstash-connectivity-issue/196686/1 "2019-08-26T00:54:30Z")

</div>

Versions used:  
logstash - 7.3.1  
filebeat - 7.3.1

the entire elastic stack is running in on same server. I am facing issue while trying to send data from filebeat to logstash.

```
2019-08-25T21:34:21.900-0300 INFO log/input.go:148 Configured paths: [C:\Users\845918\Desktop\New folder\1209\*.log]
2019-08-25T21:34:21.901-0300 INFO input/input.go:114 Starting input of type: log; ID: 573940448417788428
2019-08-25T21:34:21.901-0300 INFO crawler/crawler.go:106 Loading and starting Inputs completed. Enabled inputs: 1
2019-08-25T21:34:21.907-0300 INFO log/harvester.go:253 Harvester started for file: C:\Users\845918\Desktop\New folder\1209\app.log
2019-08-25T21:34:21.947-0300 INFO pipeline/output.go:95 Connecting to backoff(async(tcp://localhost:5601))
2019-08-25T21:34:23.998-0300 INFO pipeline/output.go:105 Connection to backoff(async(tcp://localhost:5601)) established
2019-08-25T21:34:24.049-0300 ERROR logstash/async.go:256 Failed to publish events caused by: lumberjack protocol error
2019-08-25T21:34:24.088-0300 ERROR logstash/async.go:256 Failed to publish events caused by: client is not connected
2019-08-25T21:34:25.810-0300 ERROR pipeline/output.go:121 Failed to publish events: client is not connected

```

filebeat.yml:

```
filebeat.inputs:
- type: log
  enabled: true
  paths:
    - C:\Users\845918\Desktop\New folder\1209\*.log

output.logstash:
  hosts: ["localhost:5601"]

```

first-pipeline.conf:

> input {  
> beats {  
> port =\> 5601  
> }  
> }
> 
> output {  
> elasticsearch {  
> hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
> #index =\> "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"  
> #user =\> "elastic"  
> #password =\> "changeme"  
> }  
> }

can someone guide on how to fix this issue. Thanks

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [August 26, 2019, 2:54am UTC](https://discuss.elastic.co/t/filebeat-to-logstash-connectivity-issue/196686/2 "2019-08-26T02:54:29Z")

</div>

5601 is the default kibana port, do you have kibana running on the same server?

Any errors in the logstash log?

---

<div class="post-metadata">

**Author:** ![kumarabhi](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@kumarabhi](https://discuss.elastic.co/u/kumarabhi)\
**Post date:** [August 29, 2019, 6:25pm UTC](https://discuss.elastic.co/t/filebeat-to-logstash-connectivity-issue/196686/3 "2019-08-29T18:25:35Z")

</div>

## Change Filebeat.yml

output.logstash:  
hosts: ["localhost:5044"]

## Change Logstash config

```
input {
  beats {
    port => 5044
  }
}

output {
	stdout { 
	     codec => rubydebug { } 
	}
}

```

Start Logstash from executable and pass the config file (following command on Linux .. adjust for Windows)  
`/usr/share/logstash/bin/logstash --path.config /home/kumar/Desktop/test.conf --config.reload.automatic`

The output will be displayed on stdout. This is easiest for debugging

# Logstash config test

* * *

`/usr/share/logstash/bin/logstash --config.test_and_exit -f /etc/logstash/conf.d/logstash.conf`

---

<div class="post-metadata">

**Author:** ![Arun\_Annamalai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arun_annamalai/32/46709_2.png) [@Arun\_Annamalai](https://discuss.elastic.co/u/Arun_Annamalai)\
**Post date:** [September 19, 2019, 5:12am UTC](https://discuss.elastic.co/t/filebeat-to-logstash-connectivity-issue/196686/4 "2019-09-19T05:12:01Z")

</div>

Thanks. The issue was caused due to port numbers. Got fixed after updating the same

---

<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, 5:12am UTC](https://discuss.elastic.co/t/filebeat-to-logstash-connectivity-issue/196686/5 "2019-10-17T05:12:04Z")

</div>

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