# UnavailableShardsException on cluster

**URL:** <https://discuss.elastic.co/t/unavailableshardsexception-on-cluster/214186>\
**Category:** Elasticsearch\
**Created:** [January 8, 2020, 8:23am UTC](https://discuss.elastic.co/t/unavailableshardsexception-on-cluster/214186 "2020-01-08T08:23:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidclaeys](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@davidclaeys](https://discuss.elastic.co/u/davidclaeys)\
**Post date:** [January 8, 2020, 8:23am UTC](https://discuss.elastic.co/t/unavailableshardsexception-on-cluster/214186/1 "2020-01-08T08:23:04Z")

</div>

I'm having trouble inserting data into my cluster. I've troubleshooted reading the available documentation but it seems like I'm missing something.

First of all the ES version I'm using is 5.6. Due to the another software program I'm trying to integrate with ES ([suitecrm](https://docs.suitecrm.com/admin/administration-panel/search/elasticsearch/introduction/)) this is the only version I can use. Or at least without performing significant changes to it.

This is the content of my elasticsearch.yml file :  
cluster.name: "elastic"  
node.name: "suitecrm-webserver-1"  
path.logs: /var/log/elasticsearch  
path.data: /var/lib/elasticsearch  
discovery.zen.ping.unicast.hosts: ["127.0.0.1"]  
discovery.zen.minimum\_master\_nodes: 1  
node.master: true  
node.data: false  
network.host: [_site_, _local_]  
node.max\_local\_storage\_nodes: 1  
node.attr.fault\_domain: 0  
node.attr.update\_domain: 0  
cluster.routing.allocation.awareness.attributes: fault\_domain,update\_domain  
cluster.routing.allocation.disk.threshold\_enabled: false  
cluster.routing.allocation.disk.watermark.low: 500mb  
cluster.info.update.interval: 1m  
bootstrap.memory\_lock: true  
xpack.security.enabled: true

This is the content of my elastic.log file :  
[2020-01-08T07:56:52,890][WARN][o.e.x.m.e.l.LocalExporter] unexpected error while indexing monitoring document  
org.elasticsearch.xpack.monitoring.exporter.ExportException: UnavailableShardsException[[.monitoring-es-6-2020.01.08][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.monitoring-es-6-2020.01.08][0]] containing$  
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$throwExportException$2(LocalBulk.java:130) ~[?:?]  
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0\_222]  
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0\_222]  
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0\_222]  
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0\_222]  
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0\_222]  
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0\_222]  
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0\_222]  
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0\_222]  
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0\_222]  
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.throwExportException(LocalBulk.java:131) ~[?:?]  
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$doFlush$0(LocalBulk.java:114) ~[?:?]  
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:59) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:43) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:88) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:84) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$apply$0(SecurityActionFilter.java:127) ~[?:?]  
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:59) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:43) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.bulk.TransportBulkAction$BulkRequestModifier.lambda$wrapActionListenerIfNeeded$0(TransportBulkAction.java:583) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:59) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.finishHim(TransportBulkAction.java:389) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.onFailure(TransportBulkAction.java:384) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.TransportAction$1.onFailure(TransportAction.java:94) ~[elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.ActionListener$1.onFailure(ActionListener.java:67) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.ContextPreservingActionListener.onFailure(ContextPreservingActionListener.java:50) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.finishAsFailed(TransportReplicationAction.java:857) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retry(TransportReplicationAction.java:826) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryBecauseUnavailable(TransportReplicationAction.java:892) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryIfUnavailable(TransportReplicationAction.java:728) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:681) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$2.onTimeout(TransportReplicationAction.java:846) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:311) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:238) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.cluster.service.ClusterService$NotifyTimeout.run(ClusterService.java:1056) [elasticsearch-5.6.10.jar:5.6.10]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:575) [elasticsearch-5.6.10.jar:5.6.10]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0\_222]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0\_222]  
at java.lang.Thread.run(Thread.java:748) [?:1.8.0\_222]  
Caused by: org.elasticsearch.action.UnavailableShardsException: [.monitoring-es-6-2020.01.08][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.monitoring-es-6-2020.01.08][0]] containing [22] requests]  
... 12 more

What am I missing out ?

---

<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:** [February 5, 2020, 8:23am UTC](https://discuss.elastic.co/t/unavailableshardsexception-on-cluster/214186/2 "2020-02-05T08:23:04Z")

</div>

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