# Winlogbeat unable to connect to ES after enabling x-pack

**URL:** <https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334>\
**Category:** Beats\
**Tags:** elastic-stack-security, winlogbeat\
**Created:** [July 1, 2019, 1:51pm UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334 "2019-07-01T13:51:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![K\_B1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/k_b1/32/48063_2.png) [@K\_B1](https://discuss.elastic.co/u/K_B1)\
**Post date:** [July 1, 2019, 1:51pm UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334/1 "2019-07-01T13:51:45Z")

</div>

My winlogbeat is on windows server and ELK is on Ubuntu server. After upgrading to 7.1.1 and enabling X-pack , winlogbeat is unable to connect to ES and giving me error:  
**connectex: No connection could be made because the target machine actively refused it**

I also tried connecting to logstash and configuring winlogbeat.conf

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

output {
  elasticsearch {
    hosts => ["http://127.0.0.1:9200"]
    manage_template => false
    index => "windows-%{+YYYY.MM.dd}"
  }
}

```

but got same error.

I think I'm missing something in security configuration, please help...

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [July 1, 2019, 5:55pm UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334/2 "2019-07-01T17:55:05Z")

</div>

> [@K\_B1](#):
>
> input { beats { host =\> 127.0.0.1 port =\> 5044 } }

When you set `host => 127.0.0.1` in your Logstash configuration you are limiting incoming Beat connections to Beats running on the localhost. If you are expecting connections from outside machines then do not set the `host` option for the beats input in Logstash.

A similar settings exists in Elasticsearch. It's called `network.host`. If you're expecting connections from hosts on different machines then you need to set this option. [Networking | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings)

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [July 1, 2019, 6:33pm UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334/3 "2019-07-01T18:33:03Z")

</div>

if you have enable security then you need user and password in your output section. this is what I am using.  
did you setup all required internal user using following, then you need user/password  
/usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive

```
   user => elastic
  password => xxxxx
```

---

<div class="post-metadata">

**Author:** ![K\_B1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/k_b1/32/48063_2.png) [@K\_B1](https://discuss.elastic.co/u/K_B1)\
**Post date:** [July 2, 2019, 2:10pm UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334/4 "2019-07-02T14:10:12Z")

</div>

Thank a lot..

---

<div class="post-metadata">

**Author:** ![K\_B1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/k_b1/32/48063_2.png) [@K\_B1](https://discuss.elastic.co/u/K_B1)\
**Post date:** [July 2, 2019, 2:10pm UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334/5 "2019-07-02T14:10:25Z")

</div>

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:** [July 30, 2019, 2:10pm UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-es-after-enabling-x-pack/188334/6 "2019-07-30T14:10:37Z")

</div>

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