# Not able to send data to remote host

**URL:** <https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 4, 2017, 8:10am UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731 "2017-07-04T08:10:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prateek\_Kshtriya](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Prateek\_Kshtriya](https://discuss.elastic.co/u/Prateek_Kshtriya)\
**Post date:** [July 4, 2017, 8:10am UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731/1 "2017-07-04T08:10:31Z")

</div>

Hi All,

I am not able to post data to elastic-search remote host .  
Please suggest if there is any specific configuration required to be done to post data from metric-beat to different Elastic-search host.

Below error could be seen at metric-beat log-

2017-07-04T07:43:14Z ERR Connecting error publishing events (retrying): Get [http://machinename:9200](http://machinename:9200): dial tcp ip:9200: connectex: No connection could be made because the target machine actively refused it.

Regards,  
Prateek

---

<div class="post-metadata">

**Author:** ![Prateek\_Kshtriya](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Prateek\_Kshtriya](https://discuss.elastic.co/u/Prateek_Kshtriya)\
**Post date:** [July 4, 2017, 3:15pm UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731/2 "2017-07-04T15:15:39Z")

</div>

Please suggest if I am missing anything.

Regards,  
Prateek

---

<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 4, 2017, 8:22pm UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731/3 "2017-07-04T20:22:06Z")

</div>

> [@Prateek\_Kshtriya](#):
>
> dial tcp ip:9200: connectex: No connection could be made because the target machine actively refused it

This sounds like a connectivity issue. Are you have to access the same address ([http://machinename:9200](http://machinename:9200)) from a web broswer on the metricbeat host?

---

<div class="post-metadata">

**Author:** ![Prateek\_Kshtriya](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Prateek\_Kshtriya](https://discuss.elastic.co/u/Prateek_Kshtriya)\
**Post date:** [July 11, 2017, 5:38am UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731/4 "2017-07-11T05:38:03Z")

</div>

Hi Andrew ,

I added network.host: 0.0.0.0 in elasticsearch.yml ,worked for me.

Regards,  
Prateek

---

<div class="post-metadata">

**Author:** ![Eric\_Yeh](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Eric\_Yeh](https://discuss.elastic.co/u/Eric_Yeh)\
**Post date:** [July 28, 2017, 8:06am UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731/5 "2017-07-28T08:06:47Z")

</div>

I'd been messing with iptables, firewall, and other network stuff, and this is the way to make it work. I would love to hear what is the reason behind this.

Thank you!

---

<div class="post-metadata">

**Author:** ![Prateek\_Kshtriya](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Prateek\_Kshtriya](https://discuss.elastic.co/u/Prateek_Kshtriya)\
**Post date:** [July 28, 2017, 9:17am UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731/6 "2017-07-28T09:17:54Z")

</div>

I came up with the configuration as 0.0.0.0 as it is default route which leads to "the rest of" the internet instead of somewhere on the local network .  
And as suggested from Andrew it seemed to be a network issue ,post which I tried to access the elasticsearch from different machine which failed.  
Changing the configuration to 0.0.0.0 made it accessible.

Regards,  
Prateek

---

<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:** [August 25, 2017, 9:17am UTC](https://discuss.elastic.co/t/not-able-to-send-data-to-remote-host/91731/7 "2017-08-25T09:17:57Z")

</div>

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