# Metricbeat startup ERROR

**URL:** <https://discuss.elastic.co/t/metricbeat-startup-error/160749>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 13, 2018, 1:49pm UTC](https://discuss.elastic.co/t/metricbeat-startup-error/160749 "2018-12-13T13:49:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![syedmd](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@syedmd](https://discuss.elastic.co/u/syedmd)\
**Post date:** [December 13, 2018, 1:49pm UTC](https://discuss.elastic.co/t/metricbeat-startup-error/160749/1 "2018-12-13T13:49:38Z")

</div>

Hi,

I'm trying to connect metric beat with elasticsearch, it says ( Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [http://IP:9200](http://IP:9200): Get [http://IP:9200](http://IP:9200): dial tcp IP:9200: connect: connection refused]).  
FYI, File-beat is working fine with the same server.

======================================  
2018-12-13T15:04:05.329+0300 ERROR elasticsearch/elasticsearch.go:214 Error connecting to Elasticsearch at [http://IP:9200](http://IP:9200): Get [http://IP:9200](http://IP:9200): dial tcp IP:9200: connect: connection refused

2018-12-13T15:04:05.330+0300 INFO [monitoring] log/log.go:149 Total non-zero metrics {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":20,"time":{"ms":24}},"total":{"ticks":50,"time":{"ms":60},"value":0},"user":{"ticks":30,"time":{"ms":36}}},"info":{"ephemeral\_id":"104009f2-44d6-4ce3-b253-d06fc7a71d36","uptime":{"ms":36}},"memstats":{"gc\_next":4828048,"memory\_alloc":2868584,"memory\_total":8475216,"rss":21741568}},"libbeat":{"config":{"module":{"running":0}},"output":{"type":"elasticsearch"},"pipeline":{"clients":0,"events":{"active":0}}},"system":{"cpu":{"cores":4},"load":{"1":0,"15":0.05,"5":0.01,"norm":{"1":0,"15":0.0125,"5":0.0025}}}}}}

2018-12-13T15:04:05.330+0300 INFO [monitoring] log/log.go:150 Uptime: 36.671439ms

2018-12-13T15:04:05.330+0300 INFO [monitoring] log/log.go:127 Stopping metrics logging.

2018-12-13T15:04:05.330+0300 INFO instance/beat.go:358 metricbeat stopped.

2018-12-13T15:04:05.331+0300 ERROR instance/beat.go:743 Exiting: Error importing Kibana dashboards: fail to create the Elasticsearch loader: Error creating Elasticsearch client: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [http://IP:9200](http://IP:9200): Get [http://IP:9200](http://IP:9200): dial tcp IP:9200: connect: connection refused]

# Exiting: Error importing Kibana dashboards: fail to create the Elasticsearch loader: Error creating Elasticsearch client: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [http://IP:9200](http://IP:9200): Get [http://IP:9200](http://IP:9200): dial tcp IP:9200: connect: connection refused]

Thanks

Regards,  
Mohammed

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [December 14, 2018, 9:50am UTC](https://discuss.elastic.co/t/metricbeat-startup-error/160749/2 "2018-12-14T09:50:06Z")

</div>

Seems like the connection to Elasticsearch fails. Is `IP` a replacement from your side for the logs or is that what you have configured? Could you share your full config file? Can you access the Elasticsearch endpoint manually?

---

<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 11, 2019, 9:58am UTC](https://discuss.elastic.co/t/metricbeat-startup-error/160749/3 "2019-01-11T09:58:01Z")

</div>

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