# Zookeeper Metricbeat connection failure

**URL:** <https://discuss.elastic.co/t/zookeeper-metricbeat-connection-failure/79053>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 17, 2017, 4:06pm UTC](https://discuss.elastic.co/t/zookeeper-metricbeat-connection-failure/79053 "2017-03-17T16:06:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ab-agni](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@ab-agni](https://discuss.elastic.co/u/ab-agni)\
**Post date:** [March 17, 2017, 4:06pm UTC](https://discuss.elastic.co/t/zookeeper-metricbeat-connection-failure/79053/1 "2017-03-17T16:06:32Z")

</div>

Hello,

I have enabled zk module in metricbeat yml file. Both are on same host. yet I am getting connection failure between the 2 as shown in Kibana. Please help. I have other modules like docker working with metricbeat.

## error: metricset.module:zookeeper @timestamp:March 17th 2017, 10:49:34.637 beat.hostname: (name removed) [beat.name](http://beat.name): beat.version:5.2.1 error:mntr command failed: connection to host 'localhost:2181' failed: dial tcp [::1]:2181: getsockopt: connection refused metricset.host:localhost:2181 [metricset.name](http://metricset.name):mntr metricset.rtt:1,371 type:metricsets \_id:AVrc9bW37Qa7kc61oN44 \_type:metricsets

------metric beat yml file:

- module: zookeeper  
metricsets: ["mntr"]  
enabled: true  
period: 10s  
hosts: ["localhost:2181"]

* * *

---

<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:** [March 17, 2017, 4:16pm UTC](https://discuss.elastic.co/t/zookeeper-metricbeat-connection-failure/79053/2 "2017-03-17T16:16:02Z")

</div>

> [@ab-agni](#):
>
> mntr command failed: connection to host 'localhost:2181' failed: dial tcp [::1]:2181: getsockopt: connection refused metricset.host:localhost:2181

What does `netstat -anp | grep 2181` show on that machine?

---

<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:** [April 14, 2017, 4:16pm UTC](https://discuss.elastic.co/t/zookeeper-metricbeat-connection-failure/79053/3 "2017-04-14T16:16:34Z")

</div>

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