# Beat-xpack module doesn't work on localhost 5066 port

**URL:** https://discuss.elastic.co/t/beat-xpack-module-doesnt-work-on-localhost-5066-port/248896
**Category:** Beats
**Tags:** elastic-stack-monitoring
**Created:** [September 17, 2020, 1:40am UTC](https://discuss.elastic.co/t/beat-xpack-module-doesnt-work-on-localhost-5066-port/248896 "2020-09-17T01:40:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![xpacker](https://avatars.discourse-cdn.com/v4/letter/x/ecb155/32.png) [@xpacker](https://discuss.elastic.co/u/xpacker)
#### Post date: [September 17, 2020, 1:40am UTC](https://discuss.elastic.co/t/beat-xpack-module-doesnt-work-on-localhost-5066-port/248896/1 "2020-09-17T01:40:27Z")

</div>

```auto
[root@xyz modules.d]# cat beat-xpack.yml
# Module: beat
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.6/metricbeat-module-beat.html

- module: beat
  metricsets:
    - stats
    - state
  period: 10s
  http.enabled: true
  hosts: ["http://localhost:5066"]
  #username: "user"
  #password: "secret"
  xpack.enabled: true

```

There are errors when I test beat module

```auto
[root@xyz modules.d]# metricbeat test modules beat
beat...
  stats...
    error... ERROR error making http request: Get http://localhost:5066/stats: dial tcp [::1]:5066: connect: no route to host
  state...
    error... ERROR error making http request: Get http://localhost:5066/state: dial tcp [::1]:5066: connect: no route to host

```

All other modules (elasticsearch, system, kibana) are working nicely  
Any heap is much appreciated

---

<div class="post-metadata">

### Author: ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)
#### Post date: [September 17, 2020, 10:25pm UTC](https://discuss.elastic.co/t/beat-xpack-module-doesnt-work-on-localhost-5066-port/248896/2 "2020-09-17T22:25:40Z")

</div>

Hi @xpacker, welcome to the Elastic community forums!

It sounds like the Beat you are trying to monitor with the `beat` module is not serving it's API at localhost:5066. Try adding `http.enabled: true` to that Beat's configuration file.

Shaunak

---

<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 15, 2020, 10:25pm UTC](https://discuss.elastic.co/t/beat-xpack-module-doesnt-work-on-localhost-5066-port/248896/3 "2020-10-15T22:25:41Z")

</div>

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