# Filebeat logstash primary shard error

**URL:** <https://discuss.elastic.co/t/filebeat-logstash-primary-shard-error/94546>\
**Category:** Logstash\
**Created:** [July 26, 2017, 12:09am UTC](https://discuss.elastic.co/t/filebeat-logstash-primary-shard-error/94546 "2017-07-26T00:09:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shankarbala](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@shankarbala](https://discuss.elastic.co/u/shankarbala)\
**Post date:** [July 26, 2017, 12:09am UTC](https://discuss.elastic.co/t/filebeat-logstash-primary-shard-error/94546/1 "2017-07-26T00:09:57Z")

</div>

Hi All

I have logstash 2.4.0 and filebeat 5.2.2...filebeat reads log files and send it to logstash..logstash send it to our ELK cluster running 2.2.0

here is my filebeat config

========

filebeat.prospectors:

- input\_type: log

output.logstash:

# The Logstash hosts

hosts: ["localhost:9212"]  
timeout: 320

=========================  
here is my logstash

input {  
beats {  
codec =\> "json"  
port =\> 9212  
}  
}  
filter {  
json {  
source =\> "message"  
}  
ruby {  
code =\> "require 'digest/md5';  
event['@metadata']['cdr\_id'] = Digest::MD5.hexdigest(event['X'] + event['I'] + event['LI']);  
event['type'] = 'cgroup-' + (Digest::MD5.hexdigest(event['X']).to\_i(16) % 1000).to\_s"  
}  
date {  
match =\> ["ST", "UNIX\_MS"]  
timezone =\> "UTC"  
}  
}  
output {  
if [X] in [""]  
elasticsearch {  
hosts =\> ["elk-node1:9200","elk-node2:9200"]  
flush\_size =\> 1000  
document\_id =\> "%{[@metadata][cdr\_id]}"  
index =\> "lob%{+YYYYMMdd}"  
}  
}  
}

======  
In my log files, I see below messages  
{:timestamp=\>"2017-07-26T00:05:59.762000+0000", :message=\>"CircuitBreaker::rescuing exceptions", :name=\>"Beats input", :exception=\>LogStash::Inputs::Beats::InsertingToQueueTakeTooLong, :level=\>:warn}  
{:timestamp=\>"2017-07-26T00:05:59.763000+0000", :message=\>"Beats input: The circuit breaker has detected a slowdown or stall in the pipeline, the input is closing the current connection and rejecting new connection until the pipeline recover.", :exception=\>LogStash::Inputs::BeatsSupport::CircuitBreaker::HalfOpenBreaker, :level=\>:warn}  
{:timestamp=\>"2017-07-26T00:06:08.291000+0000", :message=\>"retrying failed action with response code: 503 ({"type"=\>"unavailable\_shards\_exception", "reason"=\>"[lob20170723][1] primary shard is not active Timeout: [1m], request: [shard bulk {[lob20170723][1]}]"})", :level=\>:info}  
{:timestamp=\>"2017-07-26T00:07:04.768000+0000", :message=\>"CircuitBreaker::rescuing exceptions", :name=\>"Beats input", :exception=\>LogStash::Inputs::Beats::InsertingToQueueTakeTooLong, :level=\>:warn}  
{:timestamp=\>"2017-07-26T00:07:04.770000+0000", :message=\>"Beats input: The circuit breaker has detected a slowdown or stall in the pipeline, the input is closing the current connection and rejecting new connection until the pipeline recover.", :exception=\>LogStash::Inputs::BeatsSupport::CircuitBreaker::HalfOpenBreaker, :level=\>:warn}

lob20170723 is one of our index name...  
I checked ELK cluster health ., and no issues with it., (green state and all shards are in STARTED state and also file system space usage is less than 50%)..

Any suggestions/recommendations to fix this error ?

Shankar

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 26, 2017, 12:47am UTC](https://discuss.elastic.co/t/filebeat-logstash-primary-shard-error/94546/2 "2017-07-26T00:47:19Z")

</div>

Can you please reformat your post and use code tags to make it easier to read..

---

<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 23, 2017, 12:47am UTC](https://discuss.elastic.co/t/filebeat-logstash-primary-shard-error/94546/3 "2017-08-23T00:47:34Z")

</div>

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