# Getting connection refused error while trying to send log file from filebeat to elasticsearch in different server.( Modified elasticsearch port to 9201)

**URL:** <https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 16, 2017, 1:22pm UTC](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264 "2017-08-16T13:22:29Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![Jeemi\_Sinha](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Jeemi\_Sinha](https://discuss.elastic.co/u/Jeemi_Sinha)\
**Post date:** [September 5, 2017, 5:55am UTC](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264/21 "2017-09-05T05:55:23Z")

</div>

Left idea of filebeat to send logs and working with logstash-forwarder. It's working. Thanks steffens for help.🙂

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [September 5, 2017, 3:40pm UTC](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264/22 "2017-09-05T15:40:36Z")

</div>

Hold on. As you moved to logstash-forwarded, now you changed architecture. Does this mean you're still having elasticsearch running in developer/testing mode? Does this mean logstash (also running in the JVM) running on the same host as Elasticsearch?

The bootstrap checks in Elasticsearch check some common system parameters, to guarantee the service running stable. By working around these checks you might end up with an unstable system you should not use in production. Plus, you're stealing additional resources from Elasticsearch by having yet another process running on the host.

filebeat is originally a fork from logstash-forwarder. It also contains a many bug-fixes. Filebeat can also send to logstash. logstash-forwarder is not maintained or supported anymore. Using logstash-forwarded is not adviced.

---

<div class="post-metadata">

**Author:** ![Jeemi\_Sinha](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Jeemi\_Sinha](https://discuss.elastic.co/u/Jeemi_Sinha)\
**Post date:** [September 6, 2017, 6:03am UTC](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264/23 "2017-09-06T06:03:16Z")

</div>

Elasticsearch, kibana and logstash are configured in same server , only filebeat i was using to send logs from different server. so for now i have just replaced filebeat with logstash-forwarder and logs are forwarding. But it is sending logs for single instance only while i have configured it to send for multiple instances.

I agree it is not recommended but still filebeat was not able to send logs to server, also same configuration exists in logstash-forwarder through which it was working smoothly without any issue

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [September 6, 2017, 11:41am UTC](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264/24 "2017-09-06T11:41:12Z")

</div>

You used filebeat to send to elasticsearch, right? You can configure filebeat to send to logstash, just as logstash-forwarder does.

---

<div class="post-metadata">

**Author:** ![Jeemi\_Sinha](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Jeemi\_Sinha](https://discuss.elastic.co/u/Jeemi_Sinha)\
**Post date:** [September 6, 2017, 12:33pm UTC](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264/25 "2017-09-06T12:33:08Z")

</div>

Yes steffens, I have already tried to send logs to logstash from filebeat as well, Again i was getting connection-refused error.

---

<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 4, 2017, 12:33pm UTC](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264/26 "2017-10-04T12:33:13Z")

</div>

Closed on October 4, 2017, 12:33pm UTC

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

[Previous page](https://discuss.elastic.co/t/getting-connection-refused-error-while-trying-to-send-log-file-from-filebeat-to-elasticsearch-in-different-server-modified-elasticsearch-port-to-9201/97264.md?page=1)
