im new to the elastic search,
we use it to capture cisco callmanager cdr record. but it seems stop working recently.
it keeped 2yr of data.
could you please help to get it working again? tried restart the ubuntu server and restart the all three services logstash/kibana/elasticsearch.
log file is saved in /home/ftp directory and it seems everytime i restart the elasticsearch the log is being processed and removed from the FTP location.
but the main problems is the kibana is not showing any content.
could you please help, could you please also let me know the command to use?
[2019-06-12T23:28:11,920][WARN ][o.e.x.m.e.l.LocalExporter] unexpected error while indexing monitoring document
org.elasticsearch.xpack.monitoring.exporter.ExportException: UnavailableShardsException[[.monitoring-kibana-6-2019.06.12][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.monitoring-kibana-6-2019.06.12][0]] containing [index {[.monitoring-kibana-6-2019.06.12][doc][GkkETmsBEBnx3tHnSM4v], source[{"cluster_uuid":"x12UfFGzRp6f6WuChd53vg","timestamp":"2019-06-12T23:27:11.915Z","interval_ms":10000,"type":"kibana_stats","source_node":{"uuid":"ICJPPKtKRd6yTTdBS00w6Q","host":"127.0.0.1","transport_address":"127.0.0.1:9300","ip":"127.0.0.1","name":"ICJPPKt","timestamp":"2019-06-12T23:27:11.915Z"},"kibana_stats":{"kibana":{"uuid":"65dd3d14-9f77-4fb8-b9d0-dac0d1f648fe","name":"elk","index":".kibana","host":"localhost","transport_address":"localhost:5601","version":"6.4.0","snapshot":false,"status":"green"},"usage":{"xpack":{"reporting":{"available":true,"enabled":true,"browser_type":"phantom","_all":0,"csv":{"available":true,"total":0},"printable_pdf":{"available":false,"total":0},"status":{},"lastDay":{"_all":0,"csv":{"available":true,"total":0},"printable_pdf":{"available":false,"total":0},"status":{}},"last7Days":{"_all":0,"csv":{"available":true,"total":0},"printable_pdf":{"available":false,"total":0},"status":{}}}}}}}]}]]]
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$throwExportException$2(LocalBulk.java:128) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_181]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_181]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_181]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_181]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_181]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_181]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_181]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_181]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_181]
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.throwExportException(LocalBulk.java:129) ~[?:?]
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$doFlush$0(LocalBulk.java:111) ~[?:?]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:43) ~[elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:85) ~[elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:81) ~[elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkRequestModifier.lambda$wrapActionListenerIfNeeded$0(TransportBulkAction.java:570) ~[elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.finishHim(TransportBulkAction.java:379) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.onFailure(TransportBulkAction.java:374) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.TransportAction$1.onFailure(TransportAction.java:91) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.finishAsFailed(TransportReplicationAction.java:896) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retry(TransportReplicationAction.java:868) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryBecauseUnavailable(TransportReplicationAction.java:927) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryIfUnavailable(TransportReplicationAction.java:773) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:726) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$2.onTimeout(TransportReplicationAction.java:887) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:317) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:244) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:573) [elasticsearch-6.4.0.jar:6.4.0]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:624) [elasticsearch-6.4.0.jar:6.4.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: org.elasticsearch.action.UnavailableShardsException: [.monitoring-kibana-6-2019.06.12][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest
That's a HUUUUUGE number of shards for a single node and likely causing you a lot of problems.
You should look to reduce that down to a few hundred using the _shrink or reindex APIs.
Please also format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you
root@elk:/home/ftp# curl -XGET "http://localhost:9200/_cat/shards?v" | more
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0index shard prirep state docs store ip node
lcch-cisco-2018.03.21 1 p UNASSIGNED
lcch-cisco-2018.03.21 1 r UNASSIGNED
lcch-cisco-2018.03.21 3 p UNASSIGNED
lcch-cisco-2018.03.21 3 r UNASSIGNED
lcch-cisco-2018.03.21 2 p UNASSIGNED
lcch-cisco-2018.03.21 2 r UNASSIGNED
lcch-cisco-2018.03.21 4 p UNASSIGNED
lcch-cisco-2018.03.21 4 r UNASSIGNED
lcch-cisco-2018.03.21 0 p UNASSIGNED
lcch-cisco-2018.03.21 0 r UNASSIGNED
alot of unassigned
root@elk:/home/ftp# curl -XGET 'localhost:9200/_cat/allocation?v&pretty'
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
935 9.4gb 64.4gb 131.3gb 195.8gb 32 127.0.0.1 127.0.0.1 ICJPPKt
6910 UNASSIGNED
Note that this assumes you have a template for the index pattern lcch-cisco-*, otherwise when you create the lcch-cisco-2018.03 index, apply your own mapping manually.
sts]"},"status":503},{"index":"lcch-cisco-2019.06","type":"lcch-cdr","id":"f3e841c8-6a49-44dc-9dd4-757ee609a7a6","cause":{"type":"unavailable_shards_exception","reason":"[lcch-cisco-2019.06][1] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[lcch-cisco-2019.06][1]] containing [194] requests]"},"status":503},{"index":"lcch-cisco-2019.06","type":"lcch-cdr","id":"02a32fd8-e474-4b8b-bef6-85c41e81e5e6","cause":{"type":"unavailable_shards_exception","reason":"[lcch-cisco-2019.06][2] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[lcch-cisco-2019.06][2]] containing [201] requests]"},"status":503},{"index":"lcch-cisco-2019.06","type":"lcch-cdr","id":"be1cfbe7-a4aa-47c0-be34-7d42fc04d1ed","cause":{"type":"unavailable_shards_exception","reason":"[lcch-cisco-2019.06][2] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[lcch-cisco-2019.06][2]] containing [201] requests]"},"status":503},{"index":"lcch-cisco-2019.06","type":"lcch-cdr","id":"ef0ebe19-8d8c-42b9-8faa-c39de111cd88","cause":{"type":"unavailable_shards_exception","reason":"[lcch-cisco-2019.06][2] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[lcch-cisco-2019.06][2]] containing [201] requests]"},"status":503}]}root@elk:/home/ftp#
Trying to reindex when some of the indices you are migrating from are in a red state wll either fail or provide incorrect results. You may need to close and/or delete indices in order to bring the cluster to at least a yellow state before you can reindex. Another option might be to temporarily reduce the number of shards by setting the number of replicas to 0, which might help the cluster recover faster.
Once you have got your cluster sorted out I would also recommend upgrading. Newer versions have limits on the number of shards per node which would provide you with a warning before you got into a state like this.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.