# Failed connection to Logstash machine

**URL:** <https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 6, 2017, 8:52am UTC](https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055 "2017-07-06T08:52:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![erion](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@erion](https://discuss.elastic.co/u/erion)\
**Post date:** [July 6, 2017, 8:52am UTC](https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055/1 "2017-07-06T08:52:04Z")

</div>

Hi,  
i have filebeat.yml:

> filebeat.prospectors:  
> -input\_type: log  
> path:
> 
> - /mnt/analisilog/www.access\_log  
> output.logstash:  
> hosts: ["52.24.17.29:5044"]

and logstash.conf

> input {  
> beats {  
> port =\> 5044  
> host =\> "54.26.43.27 }  
> }  
> output {  
> stdout {  
> codec =\> dots {}  
> }

> elasticsearch {  
> hosts =\> ["https://search-analisilog-  
> [kmynofy.eu-west-1.es.amazonaws.com](http://kmynofy.eu-west-1.es.amazonaws.com)"]  
> index =\> "%{[@metadata][beat]}-%{+YYYY.MM.dd}"  
> document\_type =\> "%{[@metadata][type]}"  
> }  
> }

when i run filebeat send me error message:

> 2017/07/06 08:42:36.608751 metrics.go:34: INFO No non-zero metrics in the last 30s  
> 2017/07/06 08:43:06.608836 metrics.go:34: INFO No non-zero metrics in the last 30s  
> 2017/07/06 08:43:36.608856 metrics.go:34: INFO No non-zero metrics in the last 30s

Thanks for help.

---

<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:** [July 6, 2017, 9:04am UTC](https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055/2 "2017-07-06T09:04:29Z")

</div>

Uhm,

`host` field doesn't seem to be the same? You have `54.26.43.27` in logstash and `52.24.17.29` in filebeat. Also I think there is a spurious `"` in the host for logstash conf

---

<div class="post-metadata">

**Author:** ![erion](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@erion](https://discuss.elastic.co/u/erion)\
**Post date:** [July 6, 2017, 9:10am UTC](https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055/3 "2017-07-06T09:10:24Z")

</div>

Hi @exekias for filebeat i use ip: 54.26.43.27 and for logstash i use: 52.24.17.29. I'm sorry i've missed the second spurious but there is. I use for filebeat and logstash two different virtual machine.  
Thanks for replay

---

<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:** [July 6, 2017, 9:24am UTC](https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055/4 "2017-07-06T09:24:03Z")

</div>

Check logstash doc for beats input:  
[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-beats.html#plugins-inputs-beats-host](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-beats.html#plugins-inputs-beats-host)

`host` field is the IP address to listen on, it's optional so if you don't define it, it will listen in all interfaces. If you define it you must definitely use logstash node IP, not filebeat's

Please check if that fixes your issue, I think it should

Best regards

---

<div class="post-metadata">

**Author:** ![erion](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@erion](https://discuss.elastic.co/u/erion)\
**Post date:** [July 6, 2017, 1:48pm UTC](https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055/5 "2017-07-06T13:48:36Z")

</div>

Hi @exekias it isn't the config but policy question of my machine so i decided to do the first try without logstash.  
But when i try load data in elasticsearch give me error.  
The filebeat.yml:

> filebeat.prospectors:  
> -input\_type: log  
> paths:
> 
> - /mnt/analisilog/www.access\_log  
> output.elasticsearch:  
> hosts: ["[search-analisilog-k2wpmymdimywzrcmyogbrfy.eu-west-1.es.amazonaws.com:443](http://search-analisilog-k2wpmymdimywzrcmyogbrfy.eu-west-1.es.amazonaws.com:443)"]  
> protocol: "https"  
> template.name: "filebeat"  
> template.path: "./filebeat.template.json"  
> template.overwrite: true

the filebeat.template.json

> {  
> "mappings": {  
> "_default_": {  
> "\_all": {  
> "enabled": true,  
> "norms": {  
> "enabled": false  
> }  
> },  
> "dynamic\_templates": [  
> {  
> "template1": {  
> "mapping": {  
> "doc\_values": true,  
> "ignore\_above": 1024,  
> "index": "not\_analyzed",  
> "type": "{dynamic\_type}"  
> },  
> "match": "_"  
> }  
> }  
> ],  
> "properties": {  
> "timestamp": {  
> "type": "date"  
> },  
> "message": {  
> "type": "string",  
> "index": "analyzed"  
> },  
> "line": {  
> "type": "integer",  
> "doc\_values": "true"  
> },  
> "offset": {  
> "type": "integer",  
> "doc\_values": "true"  
> }  
> ],  
> "properties": {  
> "timestamp": {  
> "type": "date"  
> },  
> "message": {  
> "type": "string",  
> "index": "analyzed"  
> },  
> "line": {  
> "type": "integer",  
> "doc\_values": "true"  
> },  
> "offset": {  
> "type": "integer",  
> "doc\_values": "true"  
> }  
> }  
> }  
> },  
> "settings": {  
> "index.refresh\_interval": "5s"  
> },  
> "template": "filebeat-_"  
> }

following the documentation send me this error. Can you help me?

> 2017/07/11 08:18:10.252056 metrics.go:34: INFO No non-zero metrics in the last 30s  
> 2017/07/11 08:18:40.251944 metrics.go:34: INFO No non-zero metrics in the last 30s

Thanks a lot

---

<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:** [August 3, 2017, 1:49pm UTC](https://discuss.elastic.co/t/failed-connection-to-logstash-machine/92055/6 "2017-08-03T13:49:01Z")

</div>

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