# Issue installing metricbeat

**URL:** <https://discuss.elastic.co/t/issue-installing-metricbeat/196598>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 23, 2019, 9:49pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598 "2019-08-23T21:49:51Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 23, 2019, 9:49pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/1 "2019-08-23T21:49:51Z")

</div>

I am following the setup guide from elastic for metric beat, and get the following when I run " metricbeat setup -e"

> 019-08-23T20:48:31.017Z INFO kibana/client.go:117 Kibana url: [http://localhost:5601](http://localhost:5601)  
> 2019-08-23T20:48:31.018Z ERROR instance/beat.go:877 Exiting: error connecting to  
> Kibana: fail to get the Kibana version: HTTP GET request to [http://localhost:5601/api/status](http://localhost:5601/api/status) fails:  
> fail to execute the HTTP GET request: Get [http://localhost:5601/api/status:](http://localhost:5601/api/status:) dial tcp  
> 127.0.0.1:5601: connect: connection refused. Response: .

Any assistance would be appreciated.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 23, 2019, 11:36pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/2 "2019-08-23T23:36:17Z")

</div>

Is kibana running at `http://localhost:5601/` ?

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 24, 2019, 11:07pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/3 "2019-08-24T23:07:01Z")

</div>

Kibana is set to:

> network.host: 192.168.2.39

If I set it to anything else, kibana won't start. I have the metricbeat.yml file set to point to:

> hosts: ["192.168.2.39:9200"]

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 24, 2019, 11:19pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/4 "2019-08-24T23:19:21Z")

</div>

I am unclear if elasticsearch kibana and metricbeat are all running on the same host or all different hosts.

In the metribeat.yml you still have to also set the kibana hosts if they are running on different hosts.

[https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-configuration.html](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-configuration.html)

```
setup.kibana:
  host: "mykibanahost:5601" 

```

If they are all 3 on the same host and you didn't change any other settings you don't need to edit any of the ymls to make them run.

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 24, 2019, 11:20pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/5 "2019-08-24T23:20:18Z")

</div>

They are all running on the same host. And yes, I had to edit the files to get it running, Elastic and Kibana bith crash if I don't specifically set the IP. Also, kibana is not reachable from other hosts if I leave network.host: set to localhost.

Kibana is set to:

> server.host: 192.168.2.39

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 24, 2019, 11:29pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/6 "2019-08-24T23:29:00Z")

</div>

Try setting

```
setup.kibana:
  host: "192.168.2.39:5601" 

```

That is unusual why localhost does not work what OS are you on

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 24, 2019, 11:29pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/7 "2019-08-24T23:29:32Z")

</div>

Ubuntu server virtual machine on VMware.

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 24, 2019, 11:33pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/8 "2019-08-24T23:33:23Z")

</div>

The metricbeat.yml file shows:

> kibana.host: "192.168.2.39:5601"

Is that what should be set or should it be what you show above?

Thanks,

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 24, 2019, 11:39pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/9 "2019-08-24T23:39:28Z")

</div>

So setting it to:

> host: "192.168.2.39:5601"

Works.

Now I get.

> 2019-08-24T23:36:38.186Z ERROR instance/beat.go:877 Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to [http://192.168.2.39:5601/api/status](http://192.168.2.39:5601/api/status) fails: fail to execute the HTTP GET request: Get [http://192.168.2.39:5601/api/status:](http://192.168.2.39:5601/api/status:) dial tcp 192.168.2.39:5601: connect: connection refused. Response: .  
> Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to [http://192.168.2.39:5601/api/status](http://192.168.2.39:5601/api/status) fails: fail to execute the HTTP GET request: Get [http://192.168.2.39:5601/api/status:](http://192.168.2.39:5601/api/status:) dial tcp 192.168.2.39:5601: connect: connection refused. Response: .

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 24, 2019, 11:40pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/10 "2019-08-24T23:40:09Z")

</div>

If you are using version 7.3.0

```
#============================== Kibana =====================================

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:

  # Kibana Host
  # Scheme and port can be left out and will be set to the default (http and 5601)
  # In case you specify and additional path, the scheme is required: http://localhost:5601/path
  # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
  host: "192.168.2.39:5601"

```

.......

```
#================================ Outputs =====================================

# Configure what output to use when sending the data collected by the beat.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["192.168.2.39:9200"]

  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

```

If it does not look like that ... may I ask what version of metricbeat are you using?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 24, 2019, 11:44pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/11 "2019-08-24T23:44:12Z")

</div>

What happens when you point a browser to

`http://192.168.2.39:5601`

???

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 25, 2019, 12:07am UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/12 "2019-08-25T00:07:03Z")

</div>

Looks like it is working now. It appears to have been an error with the host variable.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 25, 2019, 12:21am UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/13 "2019-08-25T00:21:03Z")

</div>

Good news

if you run

`$ cat /etc/hosts`

You should see something like this. I suspect your localhost line is commented out or does not exist, if you uncomment it then the `localhost` settings would probably work.

```
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1 localhost
```

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 25, 2019, 1:50pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/14 "2019-08-25T13:50:03Z")

</div>

It's not commented out.

> root@elk:/etc/logstash# cat /etc/hosts  
> 127.0.0.1 localhost  
> 127.0.0.1 elk elk  
> 192.168.2.39 elk elk  
> 192.168.2.39 elk-server elk-server

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback  
fe00::0 ip6-localnet  
ff00::0 ip6-mcastprefix  
ff02::1 ip6-allnodes  
ff02::2 ip6-allrouters

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 25, 2019, 2:52pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/15 "2019-08-25T14:52:30Z")

</div>

Huh odd not sure what to tell you...

Can you `$ ping localhost` and get a positive response.

---

<div class="post-metadata">

**Author:** ![Mezoloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mezoloth/32/45613_2.png) [@Mezoloth](https://discuss.elastic.co/u/Mezoloth)\
**Post date:** [August 26, 2019, 3:12pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/16 "2019-08-26T15:12:01Z")

</div>

Yes, I can.

> root@elk:/usr/share/logstash/bin# ping localhost  
> PING localhost (127.0.0.1) 56(84) bytes of data.  
> 64 bytes from localhost (127.0.0.1): icmp\_seq=1 ttl=64 time=0.032 ms  
> 64 bytes from localhost (127.0.0.1): icmp\_seq=2 ttl=64 time=0.034 ms

---

<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:** [September 23, 2019, 3:13pm UTC](https://discuss.elastic.co/t/issue-installing-metricbeat/196598/17 "2019-09-23T15:13:08Z")

</div>

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