# Logstash 5.6.8 two outputs error

**URL:** <https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561>\
**Category:** Logstash\
**Created:** [April 11, 2018, 2:22am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561 "2018-04-11T02:22:27Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 2:22am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/1 "2018-04-11T02:22:27Z")

</div>

output have two. one is output to es one is output to tcp (logstash is tcp client).  
when the tcp server is down ,but the es is online .can't bulk data into es why?  
and how slove it?

---

<div class="post-metadata">

**Author:** ![Suman\_Reddy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suman_reddy1/32/27303_2.png) [@Suman\_Reddy1](https://discuss.elastic.co/u/Suman_Reddy1)\
**Post date:** [April 11, 2018, 3:36am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/2 "2018-04-11T03:36:23Z")

</div>

Please paste your output config. Also, please paste logs.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 3:43am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/3 "2018-04-11T03:43:29Z")

</div>

configure is

```
output {
  elasticsearch { 
  hosts => ["xx:9200","xx:9200","xx:9200","xx:9200","xx:9200"] 
  user => "xx" 
  password => "xx" 
  index => "xx-data-%{+YYYY.MM.dd}" 
  document_type => "docs" 
  id => "toes"
# workers => "8"
  }
 
  tcp {
  mode => "client"
  host => "xx"
  port => 8091
  reconnect_interval => 15
# workers => "8"
      }
}

```

output error is:

```
Failed (Connection refused - Connection refused). Sleeping for 0.02
Failed (Connection refused - Connection refused). Sleeping for 0.04
Failed (Connection refused - Connection refused). Sleeping for 0.08
Failed (Connection refused - Connection refused). Sleeping for 0.16
Failed (Connection refused - Connection refused). Sleeping for 0.32
Failed (Connection refused - Connection refused). Sleeping for 0.64
Failed (Connection refused - Connection refused). Sleeping for 1.28
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
Failed (Connection refused - Connection refused). Sleeping for 2.0
```

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 3:46am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/4 "2018-04-11T03:46:13Z")

</div>

it happend this env:  
es and tcp server is all ok , the output to es and tcp is ok.  
when down the tcp server . can't output to es. no data find in es.

---

<div class="post-metadata">

**Author:** ![Suman\_Reddy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suman_reddy1/32/27303_2.png) [@Suman\_Reddy1](https://discuss.elastic.co/u/Suman_Reddy1)\
**Post date:** [April 11, 2018, 3:47am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/5 "2018-04-11T03:47:31Z")

</div>

Per my understanding and scenarios I tested. It will send data to the Es even though your other outpu is down. In this case TCP. How did you come to conclusion that Logstash is not sending data to ES?

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 3:53am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/6 "2018-04-11T03:53:30Z")

</div>

i don't find data in kibana .when the input data is also sed to logstash.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 11, 2018, 6:09am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/7 "2018-04-11T06:09:26Z")

</div>

> It will send data to the Es even though your other outpu is down.

No, that's not correct. Logstash always sends events to all outputs. If one output isn't available to process events the whole pipeline is stalled.

---

<div class="post-metadata">

**Author:** ![Suman\_Reddy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suman_reddy1/32/27303_2.png) [@Suman\_Reddy1](https://discuss.elastic.co/u/Suman_Reddy1)\
**Post date:** [April 11, 2018, 6:16am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/8 "2018-04-11T06:16:44Z")

</div>

> [@magnusbaeck](#):
>
> No, that's not correct. Logstash always sends events to all outputs. If one output isn't available to process events the whole pipeline is stalled.

There is no doubt on your knowledge Magnus. But I observed this in Logstash 6.2.2. Let me double check it. Thanks for correcting me!

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 7:21am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/9 "2018-04-11T07:21:27Z")

</div>

can change this?  
if one down ,the orther output can also output ?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 11, 2018, 7:26am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/10 "2018-04-11T07:26:28Z")

</div>

> can change this?  
> if one down ,the orther output can also output ?

That's not configurable. You could do it with multiple Logstash instances or a single instance with multiple pipelines. One pipeline that receives and filters events and sends them to a message broker of some sort, and two pipelines (one for each output) that each subscribe to the events produced by the first instance.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 7:27am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/11 "2018-04-11T07:27:52Z")

</div>

> [@magnusbaeck](#):
>
> a single instance with multiple pipelines

how configure as this? in directory have two .conf file?  
i use -f xxx.conf  
as my env ,  
can give me a example about the .conf file  
thanks so.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 7:57am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/12 "2018-04-11T07:57:37Z")

</div>

how configure as this? in directory have two .conf file?  
i use -f xxx.conf  
as my env ,  
can give me a example about the .conf file  
thanks so.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 11, 2018, 8:26am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/13 "2018-04-11T08:26:18Z")

</div>

> how configure as this? in directory have two .conf file?

No. See [Multiple Pipelines | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html).

I don't have time to write up a complete example.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 11, 2018, 8:37am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/15 "2018-04-11T08:37:44Z")

</div>

thanks . is only in logstash 6.x? i don't find mutiple-pipelines in logstash 5.6.8. 😂😂😂  
is it support logstash 5.6.8?  
can use logstash 6.x output to elasticsearch 5.6.8?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 11, 2018, 8:45am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/16 "2018-04-11T08:45:23Z")

</div>

> is only in logstash 6.x?

Yes.

> can use logstash 6.x output to elasticsearch 5.6.8?

Yes.

---

<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:** [May 9, 2018, 8:45am UTC](https://discuss.elastic.co/t/logstash-5-6-8-two-outputs-error/127561/17 "2018-05-09T08:45:26Z")

</div>

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