# Logstash multi pipeline can´t connect to one elasticsearch node

**URL:** <https://discuss.elastic.co/t/logstash-multi-pipeline-can-t-connect-to-one-elasticsearch-node/189937>\
**Category:** Logstash\
**Created:** [July 11, 2019, 8:17am UTC](https://discuss.elastic.co/t/logstash-multi-pipeline-can-t-connect-to-one-elasticsearch-node/189937 "2019-07-11T08:17:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arcefi](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Arcefi](https://discuss.elastic.co/u/Arcefi)\
**Post date:** [July 11, 2019, 8:17am UTC](https://discuss.elastic.co/t/logstash-multi-pipeline-can-t-connect-to-one-elasticsearch-node/189937/1 "2019-07-11T08:17:37Z")

</div>

Im trying to set up a complete kpi preformance tracking for my system.  
At the moment im using elasticsearch 7.1, packetbeat 7.1 logstash 7.1 and a MySQL DB.  
My tracking includes following components:

- Elasticsearch response time and count of found results
- MySQL count of all open sessions

By now the elasticsearch tracking works fine  
But when I try to use logstash multi pipeline mode to send the data to my kpi-elasticsearch node it returns connection refused for my second pipeline.

My first pipeline got following data flow:

packetbeat -\> logstash -\> kpi-elasticsearch port: 9200 index: packetbeat

for my second pipeline im using logstash jdbc-input plugin and got following data flow:

logstash -\> kpi elasticsearch port: 9200 index: mysql

Now my question is: How can I connect two pipelines to the same elasticsearch node but write into different index from one logstash instance with mulipipeline mode?  
Is there any workaround I could use?  
And what would be best practice for such a Situation.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 11, 2019, 1:26pm UTC](https://discuss.elastic.co/t/logstash-multi-pipeline-can-t-connect-to-one-elasticsearch-node/189937/2 "2019-07-11T13:26:49Z")

</div>

> [@Arcefi](#):
>
> How can I connect two pipelines to the same elasticsearch node but write into different index from one logstash instance with mulipipeline mode?

Not sure I understand the issue. If you have two pipelines then they can both have elasticsearch outputs and those can write to different indexes.

---

<div class="post-metadata">

**Author:** ![Arcefi](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Arcefi](https://discuss.elastic.co/u/Arcefi)\
**Post date:** [July 12, 2019, 6:42am UTC](https://discuss.elastic.co/t/logstash-multi-pipeline-can-t-connect-to-one-elasticsearch-node/189937/3 "2019-07-12T06:42:52Z")

</div>

I´ve found the problem...  
My elasticsearch server was configured to only accept connections from one port...  
So when I tried to create a second connection to my elasticsearch server it refused the connection.

Sry for wasting your time.

---

<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 9, 2019, 6:42am UTC](https://discuss.elastic.co/t/logstash-multi-pipeline-can-t-connect-to-one-elasticsearch-node/189937/4 "2019-08-09T06:42:54Z")

</div>

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