# Filebeat port configuration

**URL:** <https://discuss.elastic.co/t/filebeat-port-configuration/110578>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 6, 2017, 9:17pm UTC](https://discuss.elastic.co/t/filebeat-port-configuration/110578 "2017-12-06T21:17:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shreya\_Chatterjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreya_chatterjee/32/24948_2.png) [@Shreya\_Chatterjee](https://discuss.elastic.co/u/Shreya_Chatterjee)\
**Post date:** [December 6, 2017, 9:17pm UTC](https://discuss.elastic.co/t/filebeat-port-configuration/110578/1 "2017-12-06T21:17:26Z")

</div>

Hi! Im new to elastic search, I wish to send log files from filebeat to logstash. Filebeat log shows connection refused error as follows:

`2017-12-07T02:43:07+05:30 ERR Failed to connect: dial tcp 127.0.0.1:9600: connectex: No connection could be made because the target machine actively refused it.`

The input block of logstash conf file looks like this:

```
input {
	 beats {
    port => 5044
    ssl => true
	codec => multiline {
	pattern => "^(%{TIMESTAMP_ISO8601})"
      	negate => true
      	what => "previous"
	}
  }
}

```

I doubt that my filebeat is running on 5044. Im not able to figure out the port its running at. Seems like it not the default 5044 port. How do I configure the port for filebeat.exe.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 6, 2017, 9:55pm UTC](https://discuss.elastic.co/t/filebeat-port-configuration/110578/2 "2017-12-06T21:55:40Z")

</div>

Please show your filebeat config.

Also you should consider doing the multiline grouping in filebeat 🙂

---

<div class="post-metadata">

**Author:** ![Shreya\_Chatterjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreya_chatterjee/32/24948_2.png) [@Shreya\_Chatterjee](https://discuss.elastic.co/u/Shreya_Chatterjee)\
**Post date:** [December 7, 2017, 6:07am UTC](https://discuss.elastic.co/t/filebeat-port-configuration/110578/3 "2017-12-07T06:07:30Z")

</div>

Yes, have already set the multiline grouping in filebeat: Config file looks like this.

```
#=========================== Filebeat prospectors =============================

filebeat.prospectors:

- input_type: log
  paths:
    - C:\Users\shreya\Data\mylog.log 
  document_type: springlog

  ### Multiline options

  # Mutiline can be used for log messages spanning multiple lines. This is common
  # for Java Stack Traces or C-Line Continuation

  # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  multiline.pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}'

  # Defines if the pattern set under pattern should be negated or not. Default is false.
  multiline.negate: true

  # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  multiline.match: before

#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["localhost:9600"]

#================================ Logging =====================================

logging.level: debug
```

---

<div class="post-metadata">

**Author:** ![Shreya\_Chatterjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreya_chatterjee/32/24948_2.png) [@Shreya\_Chatterjee](https://discuss.elastic.co/u/Shreya_Chatterjee)\
**Post date:** [December 7, 2017, 6:08am UTC](https://discuss.elastic.co/t/filebeat-port-configuration/110578/4 "2017-12-07T06:08:20Z")

</div>

Hi @warkolm, my filebeat config file looks as above

---

<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:** [January 4, 2018, 6:08am UTC](https://discuss.elastic.co/t/filebeat-port-configuration/110578/5 "2018-01-04T06:08:40Z")

</div>

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