# Unable to connect to logstash from filebeat

**URL:** <https://discuss.elastic.co/t/unable-to-connect-to-logstash-from-filebeat/320131>\
**Category:** Logstash\
**Created:** [November 30, 2022, 9:21am UTC](https://discuss.elastic.co/t/unable-to-connect-to-logstash-from-filebeat/320131 "2022-11-30T09:21:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [November 30, 2022, 9:21am UTC](https://discuss.elastic.co/t/unable-to-connect-to-logstash-from-filebeat/320131/1 "2022-11-30T09:21:47Z")

</div>

Hi I've setup filebeat on the machine A elasticsearch and kibana on machine B and logstash on machine C. When i try to send logs from filebeat to logstash i am getting a connection refused error in status. all the services are active. The indexes are not getting created in kibana  
This is my filebeat.yml

```auto
filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

# filestream is an input for collecting log messages from files.
- type: syslog
  enabled: false
- type: log

  enabled: true
  paths:
    - /var/log/elasticsearch/elasticsearch.log
  fields:
    type: elasticsearch_syslog
  fields_under_root: true
- type: log
  enabled: true
  paths:
    - /var/log/kibana/kibana.log
  fields:
    type: kibana_syslog
  fields_under_root: true
output.logstash:
  # The Logstash hosts!!
  hosts: ["logstash_ip:5044"]
  bulk_max_size: 200

```

This is logstash conf file

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

output {
  elasticsearch {
    hosts => "http://elasticsearch:9200"
    index => "%{type}%{+YYYY.MM.dd}"
    user => "elastic"
    password => " ******"
  }
}

```

When i curl to localhost:5044

```auto
root@ip-10-0-15-99:/etc/logstash/conf.d# curl http://localhost:5044
curl: (56) Recv failure: Connection reset by peer
root@ip-10-0-15-99:/etc/logstash/conf.d# curl http://localhost:5044
curl: (1) Received HTTP/0.9 when not allowed

```

same error when i curl from filebeat machine to logstash

---

<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:** [December 28, 2022, 9:22am UTC](https://discuss.elastic.co/t/unable-to-connect-to-logstash-from-filebeat/320131/2 "2022-12-28T09:22:04Z")

</div>

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