es常见报错和解决办法(持续更新)
- 内存太少
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决办法
解决办法:
- 切换到root用户下
- 在 /etc/sysctl.conf文件最后添加一行 vm.max_map_count=262144
- /sbin/sysctl -p 使配置生效
- org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
解决办法
切换到es用户
- ElasticSearch ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
解决方案: An example of resetting the read-only index block on the twitter index: PUT /twitter/_settings { “index.blocks.read_only_allow_delete”: null }
官方描述 www.elastic.co/guide/en/el…
- **ElasticSearch ** all shards failed
- 先检查各个节点磁盘空间是否够用,一般默认超过磁盘使用率超过95%,document会变成只读模式。
解决该问题 一为扩容,二为集群设置集群设置高警戒水位线 put http://localhost:9200/_cluster/settings { "transient": { "cluster.routing.allocation.disk.watermark.flood_stage": "98%" } }
b. 查看节点信息 是否有节点down掉
c. 查看索引状态是否有red节点
http://localhost:9200/_cat/indices?v 若有red索引,1.删除 2.通过备份索引数据,然后重建index和mapping 进行恢复